xref: /aosp_15_r20/external/llvm/test/tools/gold/X86/resolve-to-alias.ll (revision 9880d6810fe72a1726cb53787c6711e909410d58)
1*9880d681SAndroid Build Coastguard Worker; RUN: llvm-as %s -o %t.o
2*9880d681SAndroid Build Coastguard Worker; RUN: llvm-as %p/Inputs/resolve-to-alias.ll -o %t2.o
3*9880d681SAndroid Build Coastguard Worker
4*9880d681SAndroid Build Coastguard Worker; RUN: %gold -plugin %llvmshlibdir/LLVMgold.so \
5*9880d681SAndroid Build Coastguard Worker; RUN:    --plugin-opt=emit-llvm \
6*9880d681SAndroid Build Coastguard Worker; RUN:    -shared %t.o %t2.o -o %t.bc
7*9880d681SAndroid Build Coastguard Worker; RUN: llvm-dis %t.bc -o %t.ll
8*9880d681SAndroid Build Coastguard Worker; RUN: FileCheck --check-prefix=PASS1 %s < %t.ll
9*9880d681SAndroid Build Coastguard Worker; RUN: FileCheck --check-prefix=PASS2 %s < %t.ll
10*9880d681SAndroid Build Coastguard Worker
11*9880d681SAndroid Build Coastguard Worker; RUN: %gold -plugin %llvmshlibdir/LLVMgold.so \
12*9880d681SAndroid Build Coastguard Worker; RUN:    --plugin-opt=emit-llvm \
13*9880d681SAndroid Build Coastguard Worker; RUN:    -shared %t2.o %t.o -o %t.bc
14*9880d681SAndroid Build Coastguard Worker; RUN: llvm-dis %t.bc -o %t.ll
15*9880d681SAndroid Build Coastguard Worker; RUN: FileCheck --check-prefix=PASS1 %s < %t.ll
16*9880d681SAndroid Build Coastguard Worker; RUN: FileCheck --check-prefix=PASS2 %s < %t.ll
17*9880d681SAndroid Build Coastguard Worker
18*9880d681SAndroid Build Coastguard Workerdefine void @foo() {
19*9880d681SAndroid Build Coastguard Worker  call void @bar()
20*9880d681SAndroid Build Coastguard Worker  ret void
21*9880d681SAndroid Build Coastguard Worker}
22*9880d681SAndroid Build Coastguard Workerdeclare void @bar()
23*9880d681SAndroid Build Coastguard Worker
24*9880d681SAndroid Build Coastguard Worker; PASS1: @bar = alias void (), void ()* @zed
25*9880d681SAndroid Build Coastguard Worker
26*9880d681SAndroid Build Coastguard Worker; PASS1:      define void @foo() {
27*9880d681SAndroid Build Coastguard Worker; PASS1-NEXT:   call void @bar()
28*9880d681SAndroid Build Coastguard Worker; PASS1-NEXT:   ret void
29*9880d681SAndroid Build Coastguard Worker; PASS1-NEXT: }
30*9880d681SAndroid Build Coastguard Worker
31*9880d681SAndroid Build Coastguard Worker; PASS2:      define void @zed() {
32*9880d681SAndroid Build Coastguard Worker; PASS2-NEXT:   ret void
33*9880d681SAndroid Build Coastguard Worker; PASS2-NEXT: }
34