diff options
author | Chris Lattner <sabre@nondot.org> | 2002-05-21 22:23:38 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2002-05-21 22:23:38 +0000 |
commit | 53eaf1e43144917a33772f41aba0487f411ceffa (patch) | |
tree | 713e2de0ae3aaf88730d2b5eadf1d6b0175c49f2 /test/Transforms/SCCP/2002-05-21-InvalidSimplify.ll | |
parent | 594b9fadb8226433350fde19071c79dde9cede67 (diff) | |
download | external_llvm-53eaf1e43144917a33772f41aba0487f411ceffa.zip external_llvm-53eaf1e43144917a33772f41aba0487f411ceffa.tar.gz external_llvm-53eaf1e43144917a33772f41aba0487f411ceffa.tar.bz2 |
New testcase
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2705 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/Transforms/SCCP/2002-05-21-InvalidSimplify.ll')
-rw-r--r-- | test/Transforms/SCCP/2002-05-21-InvalidSimplify.ll | 39 |
1 files changed, 39 insertions, 0 deletions
diff --git a/test/Transforms/SCCP/2002-05-21-InvalidSimplify.ll b/test/Transforms/SCCP/2002-05-21-InvalidSimplify.ll new file mode 100644 index 0000000..b8c03b2 --- /dev/null +++ b/test/Transforms/SCCP/2002-05-21-InvalidSimplify.ll @@ -0,0 +1,39 @@ +; This test shows SCCP "proving" that the loop (from bb6 to 14) loops infinitely +; this is in fact NOT the case, so the return should still be alive in the code +; after sccp and CFG simplification have been performed. +; +; RUN: as < %s | opt -sccp -simplifycfg | dis | grep ret + + +void "old_main"() { +bb3: ;[#uses=1] + br label %bb6 + +bb6: ;[#uses=3] + %reg403 = phi int [ %reg155, %bb14 ], [ 0, %bb3 ] ; <int> [#uses=2] + %reg155 = add int %reg403, 1 ; <int> [#uses=3] + + br label %bb11 + +bb11: + %reg407 = phi int [ %reg408, %bb11 ], [ 0, %bb6 ] ; <int> [#uses=2] + %reg408 = add int %reg407, 1 ; <int> [#uses=2] + %cond550 = setle int %reg407, 1 ; <bool> [#uses=1] + br bool %cond550, label %bb11, label %bb12 + +bb12: ;[#uses=2] + br label %bb13 + +bb13: ;[#uses=3] + %reg409 = phi int [ %reg410, %bb13 ], [ 0, %bb12 ] ; <int> [#uses=1] + %reg410 = add int %reg409, 1 ; <int> [#uses=2] + %cond552 = setle int %reg410, 2 ; <bool> [#uses=1] + br bool %cond552, label %bb13, label %bb14 + +bb14: ;[#uses=2] + %cond553 = setle int %reg155, 31 ; <bool> [#uses=1] + br bool %cond553, label %bb6, label %bb15 + +bb15: ;[#uses=1] + ret void +} |