From: Michael Kuperstein Date: Thu, 16 Jul 2015 13:55:39 +0000 (+0000) Subject: [X86] Test for r242395 (Fix emitPrologue() to make less assumptions about pushes) X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=5649b37b0e3ce14ebcd8069c9b0b6c25e35eceeb;p=oota-llvm.git [X86] Test for r242395 (Fix emitPrologue() to make less assumptions about pushes) git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@242399 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/test/CodeGen/X86/prolog-push-seq.ll b/test/CodeGen/X86/prolog-push-seq.ll new file mode 100644 index 00000000000..f23791aef92 --- /dev/null +++ b/test/CodeGen/X86/prolog-push-seq.ll @@ -0,0 +1,19 @@ +; RUN: llc < %s | FileCheck %s + +target datalayout = "e-m:x-p:32:32-i64:64-f80:32-n8:16:32-a:0:32-S32" +target triple = "i386-pc-windows-msvc18.0.0" + +declare x86_thiscallcc void @bar(i32 %a, i32 %b) + +define fastcc void @foo(i32 %a, i32 %b) #0 { +; CHECK-LABEL: foo: +; CHECK: subl $64, %esp +; CHECK-NEXT: pushl +; CHECK-NEXT: calll _bar + %local = alloca i32, i32 16 + call x86_thiscallcc void @bar(i32 %a, i32 %b) + call void asm sideeffect "nop", "~{ax},~{bx},~{cx},~{dx},~{bp},~{si},~{di}"() + ret void +} + +attributes #0 = { nounwind optsize "no-frame-pointer-elim-non-leaf"} \ No newline at end of file