xref: /aosp_15_r20/external/llvm/test/ExecutionEngine/MCJIT/remote/test-ptr-reloc-sm-pic.ll (revision 9880d6810fe72a1726cb53787c6711e909410d58)
1*9880d681SAndroid Build Coastguard Worker; RUN: %lli -remote-mcjit -mcjit-remote-process=lli-child-target%exeext \
2*9880d681SAndroid Build Coastguard Worker; RUN:   -O0 -relocation-model=pic -code-model=small %s
3*9880d681SAndroid Build Coastguard Worker; XFAIL: mips-, mipsel-, aarch64, arm, i686, i386, mingw32, win32
4*9880d681SAndroid Build Coastguard Worker; UNSUPPORTED: powerpc64-unknown-linux-gnu
5*9880d681SAndroid Build Coastguard Worker; Remove UNSUPPORTED for powerpc64-unknown-linux-gnu if problem caused by r266663 is fixed
6*9880d681SAndroid Build Coastguard Worker
7*9880d681SAndroid Build Coastguard Worker@.str = private unnamed_addr constant [6 x i8] c"data1\00", align 1
8*9880d681SAndroid Build Coastguard Worker@ptr = global i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i32 0, i32 0), align 4
9*9880d681SAndroid Build Coastguard Worker@.str1 = private unnamed_addr constant [6 x i8] c"data2\00", align 1
10*9880d681SAndroid Build Coastguard Worker@ptr2 = global i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str1, i32 0, i32 0), align 4
11*9880d681SAndroid Build Coastguard Worker
12*9880d681SAndroid Build Coastguard Workerdefine i32 @main(i32 %argc, i8** nocapture %argv) nounwind readonly {
13*9880d681SAndroid Build Coastguard Workerentry:
14*9880d681SAndroid Build Coastguard Worker  %0 = load i8*, i8** @ptr, align 4
15*9880d681SAndroid Build Coastguard Worker  %1 = load i8*, i8** @ptr2, align 4
16*9880d681SAndroid Build Coastguard Worker  %cmp = icmp eq i8* %0, %1
17*9880d681SAndroid Build Coastguard Worker  %. = zext i1 %cmp to i32
18*9880d681SAndroid Build Coastguard Worker  ret i32 %.
19*9880d681SAndroid Build Coastguard Worker}
20*9880d681SAndroid Build Coastguard Worker
21