xref: /aosp_15_r20/external/llvm/test/CodeGen/X86/inline-asm-stack-realign.ll (revision 9880d6810fe72a1726cb53787c6711e909410d58)
1*9880d681SAndroid Build Coastguard Worker; RUN: not llc -mtriple=i686-pc-win32 < %s 2>&1 | FileCheck %s
2*9880d681SAndroid Build Coastguard Worker
3*9880d681SAndroid Build Coastguard Worker; FIXME: This is miscompiled due to our unconditional use of ESI as the base
4*9880d681SAndroid Build Coastguard Worker; pointer.
5*9880d681SAndroid Build Coastguard Worker; XFAIL: *
6*9880d681SAndroid Build Coastguard Worker
7*9880d681SAndroid Build Coastguard Worker; CHECK: Stack realignment in presence of dynamic stack adjustments is not supported with inline assembly
8*9880d681SAndroid Build Coastguard Worker
9*9880d681SAndroid Build Coastguard Workerdefine i32 @foo() {
10*9880d681SAndroid Build Coastguard Workerentry:
11*9880d681SAndroid Build Coastguard Worker  %r = alloca i32, align 16
12*9880d681SAndroid Build Coastguard Worker  store i32 -1, i32* %r, align 16
13*9880d681SAndroid Build Coastguard Worker  call void asm sideeffect inteldialect "push esi\0A\09xor esi, esi\0A\09mov dword ptr $0, esi\0A\09pop esi", "=*m,~{flags},~{esi},~{esp},~{dirflag},~{fpsr},~{flags}"(i32* %r)
14*9880d681SAndroid Build Coastguard Worker  %0 = load i32, i32* %r, align 16
15*9880d681SAndroid Build Coastguard Worker  ret i32 %0
16*9880d681SAndroid Build Coastguard Worker}
17