diff options
author | Chris Lattner <sabre@nondot.org> | 2005-08-08 22:13:49 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2005-08-08 22:13:49 +0000 |
commit | 0bc6bde317d1840a75ed74b526d16c5403d13b26 (patch) | |
tree | ea69fc63547b816253e27e07f6976bcc00097dcb | |
parent | 21e1a79a31fe45fcd861d64118a60c1fcfad618a (diff) |
A testcase I don't want to break in the future
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@22718 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r-- | test/Transforms/LoopStrengthReduce/different-type-ivs.ll | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/test/Transforms/LoopStrengthReduce/different-type-ivs.ll b/test/Transforms/LoopStrengthReduce/different-type-ivs.ll new file mode 100644 index 0000000000..b8cda5a807 --- /dev/null +++ b/test/Transforms/LoopStrengthReduce/different-type-ivs.ll @@ -0,0 +1,26 @@ +; RUN: llvm-as < %s | opt -loop-reduce -disable-output +; Test to make sure that loop-reduce never crashes on IV's +; with different types but identical strides. + +void %foo() { +entry: + br label %no_exit + +no_exit: ; preds = %no_exit, %entry + %indvar = phi uint [ 0, %entry ], [ %indvar.next, %no_exit ] ; <uint> [#uses=3] + %indvar = cast uint %indvar to short ; <short> [#uses=1] + %X.0.0 = mul short %indvar, 1234 ; <short> [#uses=1] + %tmp. = mul uint %indvar, 1234 ; <uint> [#uses=1] + %tmp.5 = cast short %X.0.0 to int ; <int> [#uses=1] + %tmp.3 = call int (...)* %bar( int %tmp.5, uint %tmp. ) ; <int> [#uses=0] + %tmp.0 = call bool %pred( ) ; <int> [#uses=1] + %indvar.next = add uint %indvar, 1 ; <uint> [#uses=1] + br bool %tmp.0, label %return, label %no_exit + +return: + ret void +} + +declare bool %pred() + +declare int %bar(...) |