X86: Align the stack on word boundaries in LowerFormalArguments()
[oota-llvm.git] / test / CodeGen / X86 / 2007-03-15-GEP-Idx-Sink.ll
index af97898b3556cd5722638f3c0ea52383080c9f88..4d7c3a185a8bfafe7e7eab86c1049cae83d048db 100644 (file)
@@ -1,8 +1,14 @@
-; RUN: llvm-as < %s | llc -march=x86 -mtriple=i686-darwin | \
-; RUN:   grep {addl \$16, %esp}
+; RUN: llc < %s -march=x86 -mtriple=i686-darwin | FileCheck %s
+; RUN: llc < %s -march=x86 -mtriple=i686-darwin -addr-sink-using-gep=1 | FileCheck %s
 
-define void @foo(i8** %buf, i32 %size, i32 %col, i8* %p) {
+define void @foo(i8** %buf, i32 %size, i32 %col, i8* %p) nounwind {
 entry:
+; CHECK-LABEL: @foo
+; CHECK: push
+; CHECK: push
+; CHECK: push
+; CHECK-NOT: push
+
        icmp sgt i32 %size, 0           ; <i1>:0 [#uses=1]
        br i1 %0, label %bb.preheader, label %return