[Debug Info] add DISubroutineType and its creation takes DITypeArray.
[oota-llvm.git] / test / CodeGen / X86 / loop-strength-reduce4.ll
index 87b606f558a45c932a1f2ad017669f87531e55f3..32e78790abdb83355d577311dcca167bee383631 100644 (file)
@@ -1,10 +1,24 @@
-; RUN: llc < %s -march=x86 | grep cmp | grep 64
-; RUN: llc < %s -march=x86 | not grep inc
+; RUN: llc < %s -mtriple=i686-apple-darwin -relocation-model=static | FileCheck %s -check-prefix=STATIC
+; RUN: llc < %s -mtriple=i686-apple-darwin -relocation-model=pic | FileCheck %s -check-prefix=PIC
+
+; By starting the IV at -64 instead of 0, a cmp is eliminated,
+; as the flags from the add can be used directly.
+
+; STATIC: movl    $-64, [[ECX:%e..]]
+
+; STATIC: movl    [[EAX:%e..]], _state+76([[ECX]])
+; STATIC: addl    $16, [[ECX]]
+; STATIC: jne
+
+; In PIC mode the symbol can't be folded, so the change-compare-stride
+; trick applies.
+
+; PIC: cmpl $64
 
 @state = external global [0 x i32]             ; <[0 x i32]*> [#uses=4]
 @S = external global [0 x i32]         ; <[0 x i32]*> [#uses=4]
 
-define i32 @foo() {
+define i32 @foo() nounwind {
 entry:
        br label %bb