diff options
author | Chris Lattner <sabre@nondot.org> | 2005-03-06 21:47:40 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2005-03-06 21:47:40 +0000 |
commit | bc99f12dd2d0940d8524b94cf9ce11c1e6721604 (patch) | |
tree | 45d155349a1d23c2cd8e0d1c8f7d3d1f45c82d60 | |
parent | c1ca766e01eb129ef897af280db6db009ddf0078 (diff) |
a regtest
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@20496 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r-- | test/Transforms/LoopStrengthReduce/remove_indvar.ll | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/test/Transforms/LoopStrengthReduce/remove_indvar.ll b/test/Transforms/LoopStrengthReduce/remove_indvar.ll new file mode 100644 index 0000000000..646776af05 --- /dev/null +++ b/test/Transforms/LoopStrengthReduce/remove_indvar.ll @@ -0,0 +1,19 @@ +; Check that this test makes INDVAR and related stuff dead. +; RUN: llvm-as < %s | opt -loop-reduce | llvm-dis | not grep INDVAR + +declare bool %pred() + +void %test(int* %P) { + br label %Loop +Loop: + %INDVAR = phi int [0, %0], [%INDVAR2, %Loop] + + %STRRED = getelementptr int* %P, int %INDVAR + store int 0, int* %STRRED + + %INDVAR2 = add int %INDVAR, 1 + %cond = call bool %pred() + br bool %cond, label %Loop, label %Out +Out: + ret void +} |