Reland "Fix miscompile of MS inline assembly with stack realignment"
[oota-llvm.git] / test / CodeGen / X86 / inline-asm-stack-realign2.ll
1 ; RUN: not llc -mtriple=i686-pc-win32 < %s 2>&1 | FileCheck %s
2
3 ; We don't currently support realigning the stack and adjusting the stack
4 ; pointer in inline asm.  This can even happen in GNU asm.
5
6 ; CHECK: Stack realignment in presence of dynamic stack adjustments is not supported with inline assembly
7
8 define i32 @foo() {
9 entry:
10   %r = alloca i32, align 16
11   store i32 -1, i32* %r, align 16
12   call void asm sideeffect "push %esi\0A\09xor %esi, %esi\0A\09mov %esi, $0\0A\09pop %esi", "=*m,~{flags},~{esi},~{esp},~{dirflag},~{fpsr},~{flags}"(i32* %r)
13   %0 = load i32* %r, align 16
14   ret i32 %0
15 }