aboutsummaryrefslogtreecommitdiffstats
path: root/test/Transforms/LoopRotate/pr22337.ll
diff options
context:
space:
mode:
Diffstat (limited to 'test/Transforms/LoopRotate/pr22337.ll')
-rw-r--r--test/Transforms/LoopRotate/pr22337.ll24
1 files changed, 24 insertions, 0 deletions
diff --git a/test/Transforms/LoopRotate/pr22337.ll b/test/Transforms/LoopRotate/pr22337.ll
new file mode 100644
index 0000000..c2893db
--- /dev/null
+++ b/test/Transforms/LoopRotate/pr22337.ll
@@ -0,0 +1,24 @@
+; RUN: opt < %s -loop-rotate -S | FileCheck %s
+
+@a = external global i8, align 4
+@tmp = global i8* @a
+
+define void @f() {
+; CHECK-LABEL: define void @f(
+; CHECK: getelementptr i8* @a, i32 0
+entry:
+ br label %for.preheader
+
+for.preheader:
+ br i1 undef, label %if.then8, label %for.body
+
+for.body:
+ br i1 undef, label %if.end, label %if.then8
+
+if.end:
+ %arrayidx = getelementptr i8* @a, i32 0
+ br label %for.preheader
+
+if.then8:
+ unreachable
+}