brintos

brintos / llvm-project-archived public Read only

0
0
Text · 1.2 KiB · 6c9037f Raw
39 lines · plain
1; RUN: opt -module-summary %s -o %t1.o2; RUN: opt -module-summary -o %t2.o %S/Inputs/not-prevailing.ll3; RUN: llvm-lto2 run -o %t3.o %t1.o %t2.o -r %t1.o,foo,x -r %t1.o,zed,px -r %t1.o,bar,x \4; RUN:   -r %t2.o,bar,x -save-temps5 6; Check that 'foo' and 'bar' were not inlined.7; CHECK:      <zed>:8; CHECK-NEXT:  {{.*}}  pushq   %rbx9; CHECK-NEXT:  {{.*}}  callq   0x6 <zed+0x6>10; CHECK-NEXT:  {{.*}}  movl    %eax, %ebx11; CHECK-NEXT:  {{.*}}  callq   0xd <zed+0xd>12; CHECK-NEXT:  {{.*}}  movl    %ebx, %eax13; CHECK-NEXT:  {{.*}}  popq    %rbx14; CHECK-NEXT:  {{.*}}  retq15 16; RUN: llvm-objdump -d %t3.o.1 | FileCheck %s17; RUN: llvm-readelf --symbols %t3.o.1 | FileCheck %s --check-prefix=SYMBOLS18 19; Check that 'foo' and 'bar' produced as undefined.20; SYMBOLS: FUNC    GLOBAL DEFAULT    2 zed21; SYMBOLS: NOTYPE  GLOBAL DEFAULT  UND foo22; SYMBOLS: NOTYPE  GLOBAL DEFAULT  UND bar23 24target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"25target triple = "x86_64-unknown-linux-gnu"26 27$foo = comdat any28define weak i32 @foo() comdat {29  ret i32 6530}31 32declare void @bar()33 34define i32 @zed() {35  %1 = tail call i32 @foo()36  call void @bar()37  ret i32 %138}39