aad/fix labels in test/CodeGen/X86/StackColoring.ll
[oota-llvm.git] / test / CodeGen / X86 / 2008-10-27-CoalescerBug.ll
index afeb358da5725a7134edbdc616bfe46ca8bbd107..b1dcd031265b58d3c9e8017629522b2c19c368b4 100644 (file)
@@ -1,6 +1,10 @@
-; RUN: llc < %s -march=x86 -mattr=+sse2 -stats |& not grep {Number of register spills}
+; REQUIRES: asserts
+; RUN: llc < %s -mtriple=i386-apple-darwin -mattr=+sse2 -stats 2>&1 | FileCheck %s
+; Now this test spills one register. But a reload in the loop is cheaper than
+; the divsd so it's a win.
 
 define fastcc void @fourn(double* %data, i32 %isign) nounwind {
+; CHECK: fourn
 entry:
        br label %bb
 
@@ -11,8 +15,12 @@ bb:          ; preds = %bb, %entry
        %1 = icmp sgt i32 %0, 2         ; <i1> [#uses=1]
        br i1 %1, label %bb30.loopexit, label %bb
 
+; CHECK: %bb30.loopexit
+; CHECK: divsd %xmm0
+; CHECK: movsd %xmm0, 16(%esp)
+; CHECK: %bb3
 bb3:           ; preds = %bb30.loopexit, %bb25, %bb3
-       %2 = load i32* null, align 4            ; <i32> [#uses=1]
+       %2 = load i32, i32* null, align 4               ; <i32> [#uses=1]
        %3 = mul i32 %2, 0              ; <i32> [#uses=1]
        %4 = icmp slt i32 0, %3         ; <i1> [#uses=1]
        br i1 %4, label %bb18, label %bb3