aboutsummaryrefslogtreecommitdiffstats
path: root/test/Analysis
diff options
context:
space:
mode:
authorNick Lewycky <nicholas@mxc.ca>2007-11-20 08:24:44 +0000
committerNick Lewycky <nicholas@mxc.ca>2007-11-20 08:24:44 +0000
commitcf96db2c1dc21a74a13faa74b8bb2f9a937fc6c9 (patch)
tree7e715ba0cd375ad406ed636e7eddaa92849d36c3 /test/Analysis
parentcec5f3003f8f12fb7c02e292c9195054c4cf0012 (diff)
downloadexternal_llvm-cf96db2c1dc21a74a13faa74b8bb2f9a937fc6c9.zip
external_llvm-cf96db2c1dc21a74a13faa74b8bb2f9a937fc6c9.tar.gz
external_llvm-cf96db2c1dc21a74a13faa74b8bb2f9a937fc6c9.tar.bz2
Be more careful when transforming | to +. Patch from Wojciech Matyjewicz.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@44248 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/Analysis')
-rw-r--r--test/Analysis/ScalarEvolution/2007-11-18-OrInstruction.ll18
1 files changed, 18 insertions, 0 deletions
diff --git a/test/Analysis/ScalarEvolution/2007-11-18-OrInstruction.ll b/test/Analysis/ScalarEvolution/2007-11-18-OrInstruction.ll
new file mode 100644
index 0000000..830a402
--- /dev/null
+++ b/test/Analysis/ScalarEvolution/2007-11-18-OrInstruction.ll
@@ -0,0 +1,18 @@
+; RUN: llvm-as < %s | opt -analyze -scalar-evolution 2>&1 | grep -e '--> %b'
+; PR1810
+
+define void @fun() {
+entry:
+ br label %header
+header:
+ %i = phi i32 [ 1, %entry ], [ %i.next, %body ]
+ %cond = icmp eq i32 %i, 10
+ br i1 %cond, label %exit, label %body
+body:
+ %a = mul i32 %i, 5
+ %b = or i32 %a, 1
+ %i.next = add i32 %i, 1
+ br label %header
+exit:
+ ret void
+}