Chris's constant data sequence refactoring actually enabled printing
[oota-llvm.git] / test / CodeGen / X86 / fast-isel-x86.ll
index f7dbe6e2c224ed61b66970e62b513283b52cf1d1..19972f74b2ba3c621cc5d40cc21207e0709d5bab 100644 (file)
@@ -1,4 +1,4 @@
-; RUN: llc -march=x86 -relocation-model=pic
+; RUN: llc -fast-isel -O0 -mtriple=i386-apple-darwin10 -relocation-model=pic < %s | FileCheck %s
 
 ; This should use flds to set the return value.
 ; CHECK: test0:
@@ -28,6 +28,21 @@ define void @test1({i32, i32, i32, i32}* sret %p) nounwind {
 ; CHECK: ret
 @HHH = external global i32
 define i32 @test2() nounwind {
-  %t = load i32* @H
+  %t = load i32* @HHH
   ret i32 %t
 }
+
+; Check that we fast-isel sret, and handle the callee-pops behavior correctly.
+%struct.a = type { i64, i64, i64 }
+define void @test3() nounwind ssp {
+entry:
+  %tmp = alloca %struct.a, align 8
+  call void @test3sret(%struct.a* sret %tmp)
+  ret void
+; CHECK: test3:
+; CHECK: subl $44
+; CHECK: leal 16(%esp)
+; CHECK: calll _test3sret
+; CHECK: addl $40
+}
+declare void @test3sret(%struct.a* sret)