aboutsummaryrefslogtreecommitdiffstats
path: root/test/Transforms/IndVarSimplify/2009-04-22-IndvarCrash.ll
diff options
context:
space:
mode:
authorEvan Cheng <evan.cheng@apple.com>2009-04-22 22:45:37 +0000
committerEvan Cheng <evan.cheng@apple.com>2009-04-22 22:45:37 +0000
commit1abe64663e0865cf9bdc23de734df49acea2b0d4 (patch)
tree8cf2fb3ad9733301ea675367b367846a4f83d4ba /test/Transforms/IndVarSimplify/2009-04-22-IndvarCrash.ll
parent5654613a013b94a92f9ed65e1a2f34e0a8d9cfdf (diff)
downloadexternal_llvm-1abe64663e0865cf9bdc23de734df49acea2b0d4.zip
external_llvm-1abe64663e0865cf9bdc23de734df49acea2b0d4.tar.gz
external_llvm-1abe64663e0865cf9bdc23de734df49acea2b0d4.tar.bz2
Avoid deferencing use_begin() if value does not have a use.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@69836 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/Transforms/IndVarSimplify/2009-04-22-IndvarCrash.ll')
-rw-r--r--test/Transforms/IndVarSimplify/2009-04-22-IndvarCrash.ll17
1 files changed, 17 insertions, 0 deletions
diff --git a/test/Transforms/IndVarSimplify/2009-04-22-IndvarCrash.ll b/test/Transforms/IndVarSimplify/2009-04-22-IndvarCrash.ll
new file mode 100644
index 0000000..e42f3b3
--- /dev/null
+++ b/test/Transforms/IndVarSimplify/2009-04-22-IndvarCrash.ll
@@ -0,0 +1,17 @@
+; RUN: llvm-as < %s | opt -indvars
+
+define i32 @t() nounwind ssp {
+entry:
+ br label %bb32
+
+bb32: ; preds = %bb32, %entry
+ %mbPartIdx.0.reg2mem.0 = phi i8 [ %2, %bb32 ], [ 0, %entry ] ; <i8> [#uses=3]
+ %0 = and i8 %mbPartIdx.0.reg2mem.0, 1 ; <i8> [#uses=0]
+ %1 = zext i8 %mbPartIdx.0.reg2mem.0 to i64 ; <i64> [#uses=0]
+ %2 = add i8 %mbPartIdx.0.reg2mem.0, 1 ; <i8> [#uses=2]
+ %3 = icmp ugt i8 %2, 3 ; <i1> [#uses=1]
+ br i1 %3, label %bb41, label %bb32
+
+bb41: ; preds = %bb32
+ ret i32 0
+}