aboutsummaryrefslogtreecommitdiffstats
path: root/test/Transforms/LoopStrengthReduce/pr2537.ll
diff options
context:
space:
mode:
Diffstat (limited to 'test/Transforms/LoopStrengthReduce/pr2537.ll')
-rw-r--r--test/Transforms/LoopStrengthReduce/pr2537.ll21
1 files changed, 21 insertions, 0 deletions
diff --git a/test/Transforms/LoopStrengthReduce/pr2537.ll b/test/Transforms/LoopStrengthReduce/pr2537.ll
new file mode 100644
index 0000000..73c3152
--- /dev/null
+++ b/test/Transforms/LoopStrengthReduce/pr2537.ll
@@ -0,0 +1,21 @@
+; RUN: opt < %s -loop-reduce -disable-output
+; PR 2537
+
+define void @a() {
+entry:
+ br label %dobody
+
+dobody: ; preds = %dobody, %entry
+ %y.0 = phi i128 [ 0, %entry ], [ %add, %dobody ]
+ %x.0 = phi i128 [ 0, %entry ], [ %add2, %dobody ]
+ %add = add i128 %y.0, shl (i128 1, i128 64)
+ %add2 = add i128 %x.0, shl (i128 1, i128 48)
+ call void @b( i128 %add )
+ %cmp = icmp ult i128 %add2, shl (i128 1, i128 64)
+ br i1 %cmp, label %dobody, label %afterdo
+
+afterdo: ; preds = %dobody
+ ret void
+}
+
+declare void @b(i128 %add) \ No newline at end of file