diff options
author | Chris Lattner <sabre@nondot.org> | 2003-12-10 05:42:23 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2003-12-10 05:42:23 +0000 |
commit | 94046b2cc946e4541127313b6690ef60d4a8765d (patch) | |
tree | 1723c6395058d1d0c46b8a3da0dffa58b3452cc2 /test | |
parent | 47c1b6d7403d5df7acbb2d7e93685309c10deded (diff) |
new testcase, checking to ensure we handle yet-another spiffy case correctly
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@10357 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test')
-rw-r--r-- | test/Transforms/LICM/sink_only_some_exits.ll | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/test/Transforms/LICM/sink_only_some_exits.ll b/test/Transforms/LICM/sink_only_some_exits.ll new file mode 100644 index 0000000000..e672e58543 --- /dev/null +++ b/test/Transforms/LICM/sink_only_some_exits.ll @@ -0,0 +1,25 @@ +; This testcase checks to make sure we can sink values which are only live on +; some exits out of the loop, and that we can do so without breaking dominator +; info. +; +; RUN: llvm-as < %s | opt -licm | llvm-dis | grep -C1 add | grep exit2: + +implementation ; Functions: + +int %test(bool %C1, bool %C2, int *%P, int* %Q) { +Entry: + br label %Loop + +Loop: + br bool %C1, label %Cont, label %exit1 +Cont: + %X = load int* %P + store int %X, int* %Q + %V = add int %X, 1 + br bool %C2, label %Loop, label %exit2 + +exit1: + ret int 0 +exit2: + ret int %V +} |