aboutsummaryrefslogtreecommitdiffstats
path: root/test/Analysis
diff options
context:
space:
mode:
authorWojciech Matyjewicz <wmatyjewicz@fastmail.fm>2008-07-20 15:55:14 +0000
committerWojciech Matyjewicz <wmatyjewicz@fastmail.fm>2008-07-20 15:55:14 +0000
commitde0f2382e4aa99c921216574ce97f09c3d145d0f (patch)
tree3b5d9ec1f33c87da491d11462800a095a1830a1f /test/Analysis
parentb8c44d3aacca4ac25ceca2f25c27cdc0cfc5b73c (diff)
downloadexternal_llvm-de0f2382e4aa99c921216574ce97f09c3d145d0f.zip
external_llvm-de0f2382e4aa99c921216574ce97f09c3d145d0f.tar.gz
external_llvm-de0f2382e4aa99c921216574ce97f09c3d145d0f.tar.bz2
Fix PR2088. Use modulo linear equation solver to compute loop iteration
count. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@53810 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/Analysis')
-rw-r--r--test/Analysis/ScalarEvolution/2008-05-25-NegativeStepToZero.ll1
-rw-r--r--test/Analysis/ScalarEvolution/2008-07-19-InfiniteLoop.ll15
-rw-r--r--test/Analysis/ScalarEvolution/2008-07-19-WrappingIV.ll15
3 files changed, 30 insertions, 1 deletions
diff --git a/test/Analysis/ScalarEvolution/2008-05-25-NegativeStepToZero.ll b/test/Analysis/ScalarEvolution/2008-05-25-NegativeStepToZero.ll
index cea2a98..228de9e 100644
--- a/test/Analysis/ScalarEvolution/2008-05-25-NegativeStepToZero.ll
+++ b/test/Analysis/ScalarEvolution/2008-05-25-NegativeStepToZero.ll
@@ -1,7 +1,6 @@
; RUN: llvm-as < %s | opt -analyze -scalar-evolution \
; RUN: -scalar-evolution-max-iterations=0 | grep {61 iterations}
; PR2364
-; XFAIL: *
define i32 @func_6() nounwind {
entry:
diff --git a/test/Analysis/ScalarEvolution/2008-07-19-InfiniteLoop.ll b/test/Analysis/ScalarEvolution/2008-07-19-InfiniteLoop.ll
new file mode 100644
index 0000000..a3cc600
--- /dev/null
+++ b/test/Analysis/ScalarEvolution/2008-07-19-InfiniteLoop.ll
@@ -0,0 +1,15 @@
+; RUN: llvm-as < %s | opt -analyze -scalar-evolution \
+; RUN: -scalar-evolution-max-iterations=0 | grep Unpredictable
+; PR2088
+
+define void @fun() {
+entry:
+ br label %loop
+loop:
+ %i = phi i8 [ 0, %entry ], [ %i.next, %loop ]
+ %i.next = add i8 %i, 4
+ %cond = icmp ne i8 %i.next, 6
+ br i1 %cond, label %loop, label %exit
+exit:
+ ret void
+}
diff --git a/test/Analysis/ScalarEvolution/2008-07-19-WrappingIV.ll b/test/Analysis/ScalarEvolution/2008-07-19-WrappingIV.ll
new file mode 100644
index 0000000..ce03db0
--- /dev/null
+++ b/test/Analysis/ScalarEvolution/2008-07-19-WrappingIV.ll
@@ -0,0 +1,15 @@
+; RUN: llvm-as < %s | opt -analyze -scalar-evolution \
+; RUN: -scalar-evolution-max-iterations=0 | grep {113 iterations}
+; PR2088
+
+define void @fun() {
+entry:
+ br label %loop
+loop:
+ %i = phi i8 [ 0, %entry ], [ %i.next, %loop ]
+ %i.next = add i8 %i, 18
+ %cond = icmp ne i8 %i.next, 4
+ br i1 %cond, label %loop, label %exit
+exit:
+ ret void
+}