summaryrefslogtreecommitdiffstats
path: root/test/Transforms/LoopStrengthReduce
diff options
context:
space:
mode:
Diffstat (limited to 'test/Transforms/LoopStrengthReduce')
-rw-r--r--test/Transforms/LoopStrengthReduce/change-compare-stride-trickiness-0.ll2
-rw-r--r--test/Transforms/LoopStrengthReduce/change-compare-stride-trickiness-1.ll8
-rw-r--r--test/Transforms/LoopStrengthReduce/icmp_use_postinc.ll27
-rw-r--r--test/Transforms/LoopStrengthReduce/related_indvars.ll2
4 files changed, 6 insertions, 33 deletions
diff --git a/test/Transforms/LoopStrengthReduce/change-compare-stride-trickiness-0.ll b/test/Transforms/LoopStrengthReduce/change-compare-stride-trickiness-0.ll
index 56a89f6..36941ad 100644
--- a/test/Transforms/LoopStrengthReduce/change-compare-stride-trickiness-0.ll
+++ b/test/Transforms/LoopStrengthReduce/change-compare-stride-trickiness-0.ll
@@ -6,7 +6,7 @@ target triple = "x86_64-apple-darwin9"
; happens before the relevant use, so the comparison stride can't be
; easily changed.
-define void @foo() {
+define void @foo() nounwind {
entry:
br label %loop
diff --git a/test/Transforms/LoopStrengthReduce/change-compare-stride-trickiness-1.ll b/test/Transforms/LoopStrengthReduce/change-compare-stride-trickiness-1.ll
index 8a3978b..ea8a259 100644
--- a/test/Transforms/LoopStrengthReduce/change-compare-stride-trickiness-1.ll
+++ b/test/Transforms/LoopStrengthReduce/change-compare-stride-trickiness-1.ll
@@ -1,10 +1,10 @@
-; RUN: llc %s -o - --x86-asm-syntax=att | grep {cmpq \$8}
+; RUN: llc %s -o - --x86-asm-syntax=att | grep {cmp. \$8}
target datalayout = "e-p:64:64:64-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:64:64-f32:32:32-f64:64:64-v64:64:64-v128:128:128-a0:0:64-s0:64:64-f80:128:128"
target triple = "x86_64-apple-darwin9"
-; This is like change-compare-stride-trickiness-0.ll except the comparison
-; happens after the relevant use, so the comparison stride can be
-; easily changed.
+; The comparison happens after the relevant use, so the stride can easily
+; be changed. The comparison can be done in a narrower mode than the
+; induction variable.
define void @foo() nounwind {
entry:
diff --git a/test/Transforms/LoopStrengthReduce/icmp_use_postinc.ll b/test/Transforms/LoopStrengthReduce/icmp_use_postinc.ll
deleted file mode 100644
index 4ad5d14..0000000
--- a/test/Transforms/LoopStrengthReduce/icmp_use_postinc.ll
+++ /dev/null
@@ -1,27 +0,0 @@
-; RUN: opt < %s -loop-reduce -S | FileCheck %s
-
-define i32 @main(i32 %argc, i8** nocapture %argv) nounwind ssp {
-entry:
- br i1 undef, label %bb4.preheader, label %bb.nph8
-
-bb4.preheader: ; preds = %entry
- br label %bb4
-
-bb1: ; preds = %bb4
- br i1 undef, label %bb.nph8, label %bb3
-
-bb3: ; preds = %bb1
- %phitmp = add i32 %indvar, 1 ; <i32> [#uses=1]
- br label %bb4
-
-bb4: ; preds = %bb3, %bb4.preheader
-; CHECK: %lsr.iv = phi
-; CHECK: %lsr.iv.next = add i32 %lsr.iv, 1
-; CHECK: %0 = icmp slt i32 %lsr.iv.next, %argc
- %indvar = phi i32 [ 1, %bb4.preheader ], [ %phitmp, %bb3 ] ; <i32> [#uses=2]
- %0 = icmp slt i32 %indvar, %argc ; <i1> [#uses=1]
- br i1 %0, label %bb1, label %bb.nph8
-
-bb.nph8: ; preds = %bb4, %bb1, %entry
- unreachable
-}
diff --git a/test/Transforms/LoopStrengthReduce/related_indvars.ll b/test/Transforms/LoopStrengthReduce/related_indvars.ll
index 2494378..12942bf 100644
--- a/test/Transforms/LoopStrengthReduce/related_indvars.ll
+++ b/test/Transforms/LoopStrengthReduce/related_indvars.ll
@@ -7,7 +7,7 @@
; *D++ = F;
; }
-define void @foo(double* %D, double* %E, double %F) {
+define void @foo(double* %D, double* %E, double %F) nounwind {
entry:
%tmp.24 = icmp eq double* %D, %E ; <i1> [#uses=1]
br i1 %tmp.24, label %return, label %no_exit
OpenPOWER on IntegriCloud