Fix possible infinite loop in shrink wrapping when searching for save/restore
[oota-llvm.git] / test / CodeGen / ARM / lsr-scale-addr-mode.ll
index 0c8d38748909b06a4edb7cda3b256599762c561b..063ef76d95c93eebe2244f9980eed40963e7a1a3 100644 (file)
@@ -1,4 +1,4 @@
-; RUN: llc < %s -march=arm | grep lsl | grep -F "lsl #2]"
+; RUN: llc -mtriple=arm-eabi %s -o - | FileCheck %s
 ; Should use scaled addressing mode.
 
 define void @sintzero(i32* %a) nounwind {
@@ -9,7 +9,7 @@ entry:
 cond_next:             ; preds = %cond_next, %entry
        %indvar = phi i32 [ 0, %entry ], [ %tmp25, %cond_next ]         ; <i32> [#uses=1]
        %tmp25 = add i32 %indvar, 1             ; <i32> [#uses=3]
-       %tmp36 = getelementptr i32* %a, i32 %tmp25              ; <i32*> [#uses=1]
+       %tmp36 = getelementptr i32, i32* %a, i32 %tmp25         ; <i32*> [#uses=1]
        store i32 0, i32* %tmp36
        icmp eq i32 %tmp25, -1          ; <i1>:0 [#uses=1]
        br i1 %0, label %return, label %cond_next
@@ -17,3 +17,6 @@ cond_next:            ; preds = %cond_next, %entry
 return:                ; preds = %cond_next
        ret void
 }
+
+; CHECK: lsl{{.*}}#2]
+