diff options
author | Chris Lattner <sabre@nondot.org> | 2003-12-09 22:05:08 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2003-12-09 22:05:08 +0000 |
commit | d0069a08b94cb8afda82f868d0f9066505f7eb73 (patch) | |
tree | bf189db244ba29750d7f4090faed967479584c6f | |
parent | caef3cccf5855034819164c81a2ac18c5256d1c1 (diff) |
Add a new testcase which breaks the sinker because the loop canonnicalization
pass does not do a canonnicalization that the sinker wants.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@10346 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r-- | test/Transforms/LICM/sink_critical_edge.ll | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/test/Transforms/LICM/sink_critical_edge.ll b/test/Transforms/LICM/sink_critical_edge.ll new file mode 100644 index 0000000000..6cd081887b --- /dev/null +++ b/test/Transforms/LICM/sink_critical_edge.ll @@ -0,0 +1,19 @@ +; This testcase checks to make sure the sinker does not cause problems with +; critical edges. + +; RUN: llvm-as < %s | opt -licm | llvm-dis | grep -C1 add | grep Exit + +implementation ; Functions: + +void %test() { +Entry: + br bool false, label %Loop, label %Exit + +Loop: + %X = add int 0, 1 + br bool false, label %Loop, label %Exit + +Exit: + %Y = phi int [ 0, %Entry ], [ %X, %Loop ] + ret void +} |