[llvm] f35a898 - [Test] Add a regression test for failure introduced by 952ad4701cf0d8da79789f6b83ddaa386c60d535
Daniil Suchkov via llvm-commits
llvm-commits at lists.llvm.org
Thu Mar 5 01:34:04 PST 2020
Author: Daniil Suchkov
Date: 2020-03-05T16:32:37+07:00
New Revision: f35a898f5f1efbefb8dbb2485b75d3cba693e396
URL: https://github.com/llvm/llvm-project/commit/f35a898f5f1efbefb8dbb2485b75d3cba693e396
DIFF: https://github.com/llvm/llvm-project/commit/f35a898f5f1efbefb8dbb2485b75d3cba693e396.diff
LOG: [Test] Add a regression test for failure introduced by 952ad4701cf0d8da79789f6b83ddaa386c60d535
Added:
llvm/test/Transforms/LoopRotate/freeze-crash.ll
Modified:
Removed:
################################################################################
diff --git a/llvm/test/Transforms/LoopRotate/freeze-crash.ll b/llvm/test/Transforms/LoopRotate/freeze-crash.ll
new file mode 100644
index 000000000000..e32b858cca36
--- /dev/null
+++ b/llvm/test/Transforms/LoopRotate/freeze-crash.ll
@@ -0,0 +1,24 @@
+; RUN: opt -loop-rotate -disable-output %s
+; RUN: opt -passes=rotate -disable-output %s
+
+; Make sure we don't crash on this test.
+define void @foo(i32* %arg) {
+bb:
+ %tmp = load i32, i32* %arg, align 4
+ br label %bb1
+
+bb1: ; preds = %bb7, %bb
+ %tmp2 = phi i32 [ %tmp, %bb ], [ 1, %bb7 ]
+ %tmp3 = sub i32 0, %tmp2
+ %tmp4 = icmp ult i32 0, %tmp3
+ %tmp5 = freeze i1 %tmp4
+ br i1 %tmp5, label %bb7, label %bb6
+
+bb6: ; preds = %bb1
+ ret void
+
+bb7: ; preds = %bb1
+ %tmp8 = getelementptr inbounds i8, i8* undef, i64 8
+ br label %bb1
+}
+
More information about the llvm-commits
mailing list