From 4fe0fe8b493437e91f8510b81462ff39f0d889ca Mon Sep 17 00:00:00 2001 From: Devang Patel Date: Thu, 18 Sep 2008 23:45:14 +0000 Subject: splitLoop does not handle split condition EQ. Fixes PR 2805 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@56321 91177308-0d34-0410-b5e6-96231b3b80d8 --- test/Transforms/LoopIndexSplit/2008-09-20-Crash.ll | 38 ++++++++++++++++++++++ 1 file changed, 38 insertions(+) create mode 100644 test/Transforms/LoopIndexSplit/2008-09-20-Crash.ll (limited to 'test/Transforms/LoopIndexSplit') diff --git a/test/Transforms/LoopIndexSplit/2008-09-20-Crash.ll b/test/Transforms/LoopIndexSplit/2008-09-20-Crash.ll new file mode 100644 index 0000000000..f66edcd062 --- /dev/null +++ b/test/Transforms/LoopIndexSplit/2008-09-20-Crash.ll @@ -0,0 +1,38 @@ +; RUN: llvm-as < %s | opt -loop-index-split -disable-output +; PR 2805 +@g_330 = common global i32 0 ; [#uses=1] + +define i32 @func_45(i32 %p_47) nounwind { +entry: + br label %bb + +bb: ; preds = %bb3, %entry + %p_47_addr.0.reg2mem.0 = phi i32 [ 0, %entry ], [ %2, %bb3 ] ; [#uses=2] + %0 = icmp eq i32 %p_47_addr.0.reg2mem.0, 0 ; [#uses=1] + br i1 %0, label %bb2, label %bb1 + +bb1: ; preds = %bb + %1 = tail call i32 (...)* @func_70( i32 1 ) nounwind ; [#uses=0] + br label %bb3 + +bb2: ; preds = %bb + store i32 1, i32* @g_330, align 4 + br label %bb3 + +bb3: ; preds = %bb2, %bb1 + %2 = add i32 %p_47_addr.0.reg2mem.0, 1 ; [#uses=3] + %3 = icmp ult i32 %2, 22 ; [#uses=1] + br i1 %3, label %bb, label %bb6 + +bb6: ; preds = %bb3 + %.lcssa = phi i32 [ %2, %bb3 ] ; [#uses=1] + %4 = tail call i32 (...)* @func_95( i32 %.lcssa ) nounwind ; [#uses=1] + %5 = tail call i32 (...)* @func_56( i32 %4 ) nounwind ; [#uses=0] + ret i32 undef +} + +declare i32 @func_70(...) + +declare i32 @func_95(...) + +declare i32 @func_56(...) -- cgit v1.2.3-70-g09d2