xref: /aosp_15_r20/external/llvm/test/tools/gold/X86/alias2.ll (revision 9880d6810fe72a1726cb53787c6711e909410d58)
1*9880d681SAndroid Build Coastguard Worker; RUN: llvm-as %s -o %t.o
2*9880d681SAndroid Build Coastguard Worker; RUN: %gold -shared -o %t2.bc -plugin %llvmshlibdir/LLVMgold.so %t.o -plugin-opt=emit-llvm
3*9880d681SAndroid Build Coastguard Worker; RUN: llvm-dis %t2.bc -o - | FileCheck %s
4*9880d681SAndroid Build Coastguard Worker
5*9880d681SAndroid Build Coastguard Worker@bar = alias void (), void ()* @zed
6*9880d681SAndroid Build Coastguard Workerdefine void @foo() {
7*9880d681SAndroid Build Coastguard Worker  call void @bar()
8*9880d681SAndroid Build Coastguard Worker  ret void
9*9880d681SAndroid Build Coastguard Worker}
10*9880d681SAndroid Build Coastguard Workerdefine void @zed() {
11*9880d681SAndroid Build Coastguard Worker  ret void
12*9880d681SAndroid Build Coastguard Worker}
13*9880d681SAndroid Build Coastguard Worker
14*9880d681SAndroid Build Coastguard Worker; CHECK: @bar = alias void (), void ()* @zed
15*9880d681SAndroid Build Coastguard Worker
16*9880d681SAndroid Build Coastguard Worker; CHECK:      define void @foo() {
17*9880d681SAndroid Build Coastguard Worker; CHECK-NEXT:   call void @bar()
18*9880d681SAndroid Build Coastguard Worker; CHECK-NEXT:   ret void
19*9880d681SAndroid Build Coastguard Worker; CHECK-NEXT: }
20*9880d681SAndroid Build Coastguard Worker
21*9880d681SAndroid Build Coastguard Worker; CHECK:      define void @zed() {
22*9880d681SAndroid Build Coastguard Worker; CHECK-NEXT:   ret void
23*9880d681SAndroid Build Coastguard Worker; CHECK-NEXT: }
24