diff options
author | Chris Lattner <sabre@nondot.org> | 2005-11-29 01:06:51 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2005-11-29 01:06:51 +0000 |
commit | cae34910c91988670db472ad399cf3798cc6649f (patch) | |
tree | db1fa13604f6f24036fd5d5b08b1294d6c57435f /test/Transforms/Mem2Reg/2005-11-28-Crash.ll | |
parent | 4c286c373168269827e104749c75066b26588d58 (diff) | |
download | external_llvm-cae34910c91988670db472ad399cf3798cc6649f.zip external_llvm-cae34910c91988670db472ad399cf3798cc6649f.tar.gz external_llvm-cae34910c91988670db472ad399cf3798cc6649f.tar.bz2 |
new testcase for pr670
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24507 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/Transforms/Mem2Reg/2005-11-28-Crash.ll')
-rw-r--r-- | test/Transforms/Mem2Reg/2005-11-28-Crash.ll | 88 |
1 files changed, 88 insertions, 0 deletions
diff --git a/test/Transforms/Mem2Reg/2005-11-28-Crash.ll b/test/Transforms/Mem2Reg/2005-11-28-Crash.ll new file mode 100644 index 0000000..1facf21 --- /dev/null +++ b/test/Transforms/Mem2Reg/2005-11-28-Crash.ll @@ -0,0 +1,88 @@ +; RUN: llvm-as < %s | opt -mem2reg -disable-output +; PR670 + +void %printk(int, ...) { +entry: + %flags = alloca uint ; <uint*> [#uses=2] + br bool false, label %then.0, label %endif.0 + +then.0: ; preds = %entry + br label %endif.0 + +endif.0: ; preds = %then.0, %entry + store uint 0, uint* %flags + br label %loopentry + +loopentry: ; preds = %endif.3, %endif.0 + br bool false, label %no_exit, label %loopexit + +no_exit: ; preds = %loopentry + br bool false, label %then.1, label %endif.1 + +then.1: ; preds = %no_exit + br bool false, label %shortcirc_done.0, label %shortcirc_next.0 + +shortcirc_next.0: ; preds = %then.1 + br label %shortcirc_done.0 + +shortcirc_done.0: ; preds = %shortcirc_next.0, %then.1 + br bool false, label %shortcirc_done.1, label %shortcirc_next.1 + +shortcirc_next.1: ; preds = %shortcirc_done.0 + br label %shortcirc_done.1 + +shortcirc_done.1: ; preds = %shortcirc_next.1, %shortcirc_done.0 + br bool false, label %shortcirc_done.2, label %shortcirc_next.2 + +shortcirc_next.2: ; preds = %shortcirc_done.1 + br label %shortcirc_done.2 + +shortcirc_done.2: ; preds = %shortcirc_next.2, %shortcirc_done.1 + br bool false, label %then.2, label %endif.2 + +then.2: ; preds = %shortcirc_done.2 + br label %endif.2 + +endif.2: ; preds = %then.2, %shortcirc_done.2 + br label %endif.1 + +endif.1: ; preds = %endif.2, %no_exit + br bool false, label %then.3, label %endif.3 + +then.3: ; preds = %endif.1 + br label %endif.3 + +endif.3: ; preds = %then.3, %endif.1 + br label %loopentry + +loopexit: ; preds = %loopentry + br label %endif.4 + +then.4: ; No predecessors! + %tmp.61 = load uint* %flags ; <uint> [#uses=0] + br label %out + +dead_block_after_goto: ; No predecessors! + br label %endif.4 + +endif.4: ; preds = %dead_block_after_goto, %loopexit + br bool false, label %then.5, label %else + +then.5: ; preds = %endif.4 + br label %endif.5 + +else: ; preds = %endif.4 + br label %endif.5 + +endif.5: ; preds = %else, %then.5 + br label %out + +out: ; preds = %endif.5, %then.4 + br label %return + +after_ret: ; No predecessors! + br label %return + +return: ; preds = %after_ret, %out + ret void +} |