xref: /aosp_15_r20/external/llvm/test/CodeGen/X86/pr2849.ll (revision 9880d6810fe72a1726cb53787c6711e909410d58)
1*9880d681SAndroid Build Coastguard Worker; RUN: llc < %s
2*9880d681SAndroid Build Coastguard Worker; PR2849
3*9880d681SAndroid Build Coastguard Worker
4*9880d681SAndroid Build Coastguard Workertarget datalayout = "e-p:64:64:64-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:64:64-f32:32:32-f64:64:64-v64:64:64-v128:128:128-a0:0:64-s0:64:64-f80:128:128"
5*9880d681SAndroid Build Coastguard Workertarget triple = "x86_64-unknown-linux-gnu"
6*9880d681SAndroid Build Coastguard Worker	%struct.BaseBoundPtrs = type { i8*, i8* }
7*9880d681SAndroid Build Coastguard Worker	%struct.HashEntry = type { %struct.BaseBoundPtrs }
8*9880d681SAndroid Build Coastguard Worker	%struct.NODE = type { i8, i8, %struct.anon }
9*9880d681SAndroid Build Coastguard Worker	%struct.anon = type { %struct.xlist }
10*9880d681SAndroid Build Coastguard Worker	%struct.xlist = type { %struct.NODE*, %struct.NODE* }
11*9880d681SAndroid Build Coastguard Worker	%struct.xvect = type { %struct.NODE** }
12*9880d681SAndroid Build Coastguard Worker@hash_table_begin = external global %struct.HashEntry*
13*9880d681SAndroid Build Coastguard Worker
14*9880d681SAndroid Build Coastguard Workerdefine void @obshow() {
15*9880d681SAndroid Build Coastguard Workerentry:
16*9880d681SAndroid Build Coastguard Worker	%tmp = load %struct.HashEntry*, %struct.HashEntry** @hash_table_begin, align 8
17*9880d681SAndroid Build Coastguard Worker	br i1 false, label %xlygetvalue.exit, label %xlygetvalue.exit
18*9880d681SAndroid Build Coastguard Worker
19*9880d681SAndroid Build Coastguard Workerxlygetvalue.exit:
20*9880d681SAndroid Build Coastguard Worker	%storemerge.in.i = phi %struct.NODE** [ null, %entry ], [ null, %entry ]
21*9880d681SAndroid Build Coastguard Worker	%storemerge.i = load %struct.NODE*, %struct.NODE** %storemerge.in.i
22*9880d681SAndroid Build Coastguard Worker	%tmp1 = ptrtoint %struct.NODE** %storemerge.in.i to i64
23*9880d681SAndroid Build Coastguard Worker	%tmp2 = lshr i64 %tmp1, 3
24*9880d681SAndroid Build Coastguard Worker	%tmp3 = and i64 %tmp2, 2147483647
25*9880d681SAndroid Build Coastguard Worker	%tmp4 = getelementptr %struct.HashEntry, %struct.HashEntry* %tmp, i64 %tmp3, i32 0, i32 1
26*9880d681SAndroid Build Coastguard Worker	%tmp7 = load i8*, i8** %tmp4, align 8
27*9880d681SAndroid Build Coastguard Worker	%tmp8 = getelementptr %struct.NODE, %struct.NODE* %storemerge.i, i64 0, i32 2
28*9880d681SAndroid Build Coastguard Worker	%tmp9 = bitcast %struct.anon* %tmp8 to %struct.NODE***
29*9880d681SAndroid Build Coastguard Worker	%tmp11 = load %struct.NODE**, %struct.NODE*** %tmp9, align 8
30*9880d681SAndroid Build Coastguard Worker	%tmp12 = ptrtoint %struct.NODE** %tmp11 to i64
31*9880d681SAndroid Build Coastguard Worker	%tmp13 = lshr i64 %tmp12, 3
32*9880d681SAndroid Build Coastguard Worker	%tmp14 = and i64 %tmp13, 2147483647
33*9880d681SAndroid Build Coastguard Worker	%tmp15 = getelementptr %struct.HashEntry, %struct.HashEntry* %tmp, i64 %tmp14, i32 0, i32 1
34*9880d681SAndroid Build Coastguard Worker	call fastcc void @xlprint(i8** %tmp4, i8* %tmp7, i8** %tmp15)
35*9880d681SAndroid Build Coastguard Worker	ret void
36*9880d681SAndroid Build Coastguard Worker}
37*9880d681SAndroid Build Coastguard Worker
38*9880d681SAndroid Build Coastguard Workerdeclare fastcc void @xlprint(i8**, i8*, i8**)
39