xref: /aosp_15_r20/external/llvm/test/CodeGen/X86/lea-opt-memop-check-2.ll (revision 9880d6810fe72a1726cb53787c6711e909410d58)
1*9880d681SAndroid Build Coastguard Worker; RUN: llc < %s -mtriple=x86_64-pc-linux -mcpu=corei7 -relocation-model=pic | FileCheck %s
2*9880d681SAndroid Build Coastguard Worker
3*9880d681SAndroid Build Coastguard Worker; PR27502
4*9880d681SAndroid Build Coastguard Worker; UNREACHABLE: "Invalid address displacement operand"
5*9880d681SAndroid Build Coastguard Worker
6*9880d681SAndroid Build Coastguard Worker@buf = internal global [5 x i8*] zeroinitializer
7*9880d681SAndroid Build Coastguard Worker
8*9880d681SAndroid Build Coastguard Workerdeclare i32 @llvm.eh.sjlj.setjmp(i8*) nounwind
9*9880d681SAndroid Build Coastguard Worker
10*9880d681SAndroid Build Coastguard Workerdefine i32 @test() nounwind optsize {
11*9880d681SAndroid Build Coastguard Worker  %r = tail call i32 @llvm.eh.sjlj.setjmp(i8* bitcast ([5 x i8*]* @buf to i8*))
12*9880d681SAndroid Build Coastguard Worker  ret i32 %r
13*9880d681SAndroid Build Coastguard Worker; CHECK-LABEL: test:
14*9880d681SAndroid Build Coastguard Worker; CHECK:	leaq .LBB0_3(%rip), %r[[REG:[a-z]+]]
15*9880d681SAndroid Build Coastguard Worker; CHECK:	movq %r[[REG]], buf+8(%rip)
16*9880d681SAndroid Build Coastguard Worker; CHECK:	#EH_SjLj_Setup .LBB0_3
17*9880d681SAndroid Build Coastguard Worker; CHECK:	xorl %e[[REG]], %e[[REG]]
18*9880d681SAndroid Build Coastguard Worker; CHECK:	jmp .LBB0_2
19*9880d681SAndroid Build Coastguard Worker; CHECK-LABEL: .LBB0_3: # Block address taken
20*9880d681SAndroid Build Coastguard Worker; CHECK-LABEL: .LBB0_2:
21*9880d681SAndroid Build Coastguard Worker}
22