summaryrefslogtreecommitdiffstats
path: root/llvm/test/Analysis/ScalarEvolution/2007-09-27-LargeStepping.ll
diff options
context:
space:
mode:
authorNick Lewycky <nicholas@mxc.ca>2007-09-27 14:12:54 +0000
committerNick Lewycky <nicholas@mxc.ca>2007-09-27 14:12:54 +0000
commit3934961878e2a4de32892c56d5de7d2123bcbfc1 (patch)
tree910f525b346b72a4e42262328930460031f38f59 /llvm/test/Analysis/ScalarEvolution/2007-09-27-LargeStepping.ll
parentc9a8c74d28f269ce1143544f9094c5ef9446808b (diff)
downloadbcm5719-llvm-3934961878e2a4de32892c56d5de7d2123bcbfc1.tar.gz
bcm5719-llvm-3934961878e2a4de32892c56d5de7d2123bcbfc1.zip
Build the correct range for loops with unusual bounds. Fix from Jay Foad.
llvm-svn: 42394
Diffstat (limited to 'llvm/test/Analysis/ScalarEvolution/2007-09-27-LargeStepping.ll')
-rw-r--r--llvm/test/Analysis/ScalarEvolution/2007-09-27-LargeStepping.ll21
1 files changed, 21 insertions, 0 deletions
diff --git a/llvm/test/Analysis/ScalarEvolution/2007-09-27-LargeStepping.ll b/llvm/test/Analysis/ScalarEvolution/2007-09-27-LargeStepping.ll
new file mode 100644
index 00000000000..d7a0bafe5d6
--- /dev/null
+++ b/llvm/test/Analysis/ScalarEvolution/2007-09-27-LargeStepping.ll
@@ -0,0 +1,21 @@
+; RUN: llvm-as < %s | opt -analyze -scalar-evolution 2>&1 | grep "13 iterations"
+; PR1706
+
+define i32 @f() {
+entry:
+ br label %bb5
+
+bb: ; preds = %bb5
+ %tmp2 = shl i32 %j.0, 1 ; <i32> [#uses=1]
+ %tmp4 = add i32 %i.0, 268435456 ; <i32> [#uses=1]
+ br label %bb5
+
+bb5: ; preds = %bb, %entry
+ %j.0 = phi i32 [ 1, %entry ], [ %tmp2, %bb ] ; <i32> [#uses=2]
+ %i.0 = phi i32 [ -1879048192, %entry ], [ %tmp4, %bb ] ; <i32> [#uses=2]
+ %tmp7 = icmp slt i32 %i.0, 1610612736 ; <i1> [#uses=1]
+ br i1 %tmp7, label %bb, label %return
+
+return: ; preds = %bb5
+ ret i32 %j.0
+}
OpenPOWER on IntegriCloud