xref: /aosp_15_r20/external/llvm/test/Linker/pr21374.ll (revision 9880d6810fe72a1726cb53787c6711e909410d58)
1*9880d681SAndroid Build Coastguard Worker; RUN: llvm-link -S -o - %p/pr21374.ll %p/Inputs/pr21374.ll | FileCheck %s
2*9880d681SAndroid Build Coastguard Worker; RUN: llvm-link -S -o - %p/Inputs/pr21374.ll %p/pr21374.ll | FileCheck %s
3*9880d681SAndroid Build Coastguard Worker
4*9880d681SAndroid Build Coastguard Worker; RUN: llvm-as -o %t1.bc %p/pr21374.ll
5*9880d681SAndroid Build Coastguard Worker; RUN: llvm-as -o %t2.bc %p/Inputs/pr21374.ll
6*9880d681SAndroid Build Coastguard Worker
7*9880d681SAndroid Build Coastguard Worker; RUN: llvm-link -S -o - %t1.bc %t2.bc | FileCheck %s
8*9880d681SAndroid Build Coastguard Worker; RUN: llvm-link -S -o - %t2.bc %t1.bc | FileCheck %s
9*9880d681SAndroid Build Coastguard Worker
10*9880d681SAndroid Build Coastguard Worker; Test that we get the same result with or without lazy loading.
11*9880d681SAndroid Build Coastguard Worker
12*9880d681SAndroid Build Coastguard Worker; CHECK: %foo = type { i8* }
13*9880d681SAndroid Build Coastguard Worker; CHECK-DAG: bitcast i32* null to %foo*
14*9880d681SAndroid Build Coastguard Worker; CHECK-DAG: define void @g(%foo* %x)
15*9880d681SAndroid Build Coastguard Worker
16*9880d681SAndroid Build Coastguard Worker%foo = type { i8* }
17*9880d681SAndroid Build Coastguard Workerdefine void @f() {
18*9880d681SAndroid Build Coastguard Worker  bitcast i32* null to %foo*
19*9880d681SAndroid Build Coastguard Worker  ret void
20*9880d681SAndroid Build Coastguard Worker}
21