X86: Align the stack on word boundaries in LowerFormalArguments()
[oota-llvm.git] / test / CodeGen / X86 / 2009-02-26-MachineLICMBug.ll
index 8bf6c23d59db32bbd1fcf2668d1025fdcddc3f58..764c2cdd6d9930e2a90f98e4e87db60cd3e76aea 100644 (file)
@@ -1,18 +1,28 @@
-; RUN: llvm-as < %s | llc -march=x86-64 -mattr=+sse3 -stats |& not grep {machine-licm}
+; REQUIRES: asserts
+; RUN: llc < %s -march=x86-64 -mattr=+sse3,+sse4.1 -mcpu=penryn -stats 2>&1 | grep "4 machine-licm"
+; RUN: llc < %s -march=x86-64 -mattr=+sse3,+sse4.1 -mcpu=penryn | FileCheck %s
 ; rdar://6627786
+; rdar://7792037
 
 target triple = "x86_64-apple-darwin10.0"
        %struct.Key = type { i64 }
        %struct.__Rec = type opaque
        %struct.__vv = type {  }
 
-define %struct.__vv* @t(%struct.Key* %desc) nounwind ssp {
+define %struct.__vv* @t(%struct.Key* %desc, i64 %p) nounwind ssp {
 entry:
        br label %bb4
 
 bb4:           ; preds = %bb.i, %bb26, %bb4, %entry
+; CHECK: %bb4
+; CHECK: xorl
+; CHECK: callq
+; CHECK: xorl
+; CHECK: xorl
+; CHECK: movq
+
        %0 = call i32 (...)* @xxGetOffsetForCode(i32 undef) nounwind            ; <i32> [#uses=0]
-       %ins = or i64 0, 0              ; <i64> [#uses=1]
+       %ins = or i64 %p, 2097152               ; <i64> [#uses=1]
        %1 = call i32 (...)* @xxCalculateMidType(%struct.Key* %desc, i32 0) nounwind            ; <i32> [#uses=1]
        %cond = icmp eq i32 %1, 1               ; <i1> [#uses=1]
        br i1 %cond, label %bb26, label %bb4