xref: /aosp_15_r20/external/llvm/test/CodeGen/X86/isel-sink2.ll (revision 9880d6810fe72a1726cb53787c6711e909410d58)
1*9880d681SAndroid Build Coastguard Worker; RUN: llc < %s -march=x86 > %t
2*9880d681SAndroid Build Coastguard Worker; RUN: grep "movb.7(%...)" %t
3*9880d681SAndroid Build Coastguard Worker; RUN: not grep leal %t
4*9880d681SAndroid Build Coastguard Worker
5*9880d681SAndroid Build Coastguard Workerdefine i8 @test(i32 *%P) nounwind {
6*9880d681SAndroid Build Coastguard Worker  %Q = getelementptr i32, i32* %P, i32 1
7*9880d681SAndroid Build Coastguard Worker  %R = bitcast i32* %Q to i8*
8*9880d681SAndroid Build Coastguard Worker  %S = load i8, i8* %R
9*9880d681SAndroid Build Coastguard Worker  %T = icmp eq i8 %S, 0
10*9880d681SAndroid Build Coastguard Worker  br i1 %T, label %TB, label %F
11*9880d681SAndroid Build Coastguard WorkerTB:
12*9880d681SAndroid Build Coastguard Worker  ret i8 4
13*9880d681SAndroid Build Coastguard WorkerF:
14*9880d681SAndroid Build Coastguard Worker  %U = getelementptr i8, i8* %R, i32 3
15*9880d681SAndroid Build Coastguard Worker  %V = load i8, i8* %U
16*9880d681SAndroid Build Coastguard Worker  ret i8 %V
17*9880d681SAndroid Build Coastguard Worker}
18