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 | 289df6b3de7ba3c9f41615f555cdf8160419ab7a (patch) | |
tree | b3bdd902a9a5556d9ef75924347373b63670e7af | |
parent | e54534513187af923a0a5728f6ecd8ecba6f1629 (diff) | |
download | llvm-289df6b3de7ba3c9f41615f555cdf8160419ab7a.zip llvm-289df6b3de7ba3c9f41615f555cdf8160419ab7a.tar.gz llvm-289df6b3de7ba3c9f41615f555cdf8160419ab7a.tar.bz2 |
new testcase, checking to ensure we handle yet-another spiffy case correctly
llvm-svn: 10357
-rw-r--r-- | llvm/test/Regression/Transforms/LICM/sink_only_some_exits.ll | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/llvm/test/Regression/Transforms/LICM/sink_only_some_exits.ll b/llvm/test/Regression/Transforms/LICM/sink_only_some_exits.ll new file mode 100644 index 0000000..e672e58 --- /dev/null +++ b/llvm/test/Regression/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 +} |