diff options
author | Nick Lewycky <nicholas@mxc.ca> | 2011-09-06 21:42:18 +0000 |
---|---|---|
committer | Nick Lewycky <nicholas@mxc.ca> | 2011-09-06 21:42:18 +0000 |
commit | c103a08a1115249548d6bb57a74a16de4f0864e3 (patch) | |
tree | 015086e49c8ab2b9b9997fa0d132cb4aee987075 /test/Analysis/ScalarEvolution | |
parent | 34c4485b7479a12b5ef1cb15d27e96277e8a499a (diff) | |
download | external_llvm-c103a08a1115249548d6bb57a74a16de4f0864e3.zip external_llvm-c103a08a1115249548d6bb57a74a16de4f0864e3.tar.gz external_llvm-c103a08a1115249548d6bb57a74a16de4f0864e3.tar.bz2 |
This transform only handles two-operand AddRec's. Prevent it from trying to
handle anything more complex. Fixes PR10383 again!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@139186 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/Analysis/ScalarEvolution')
-rw-r--r-- | test/Analysis/ScalarEvolution/SolveQuadraticEquation.ll | 21 |
1 files changed, 20 insertions, 1 deletions
diff --git a/test/Analysis/ScalarEvolution/SolveQuadraticEquation.ll b/test/Analysis/ScalarEvolution/SolveQuadraticEquation.ll index 2c4ef16..06f1b6f 100644 --- a/test/Analysis/ScalarEvolution/SolveQuadraticEquation.ll +++ b/test/Analysis/ScalarEvolution/SolveQuadraticEquation.ll @@ -35,7 +35,7 @@ return: ; preds = %bb5 ; PR10383 -; This used to crash. +; These next two used to crash. define void @test2(i1 %cmp, i64 %n) { entry: @@ -61,3 +61,22 @@ end: ret void } ; CHECK: Determining loop execution counts for: @test2 + +define i32 @test3() { +if.then466: + br i1 undef, label %for.cond539.preheader, label %for.inc479 + +for.inc479: + %a2.07 = phi i32 [ %add495, %for.inc479 ], [ 0, %if.then466 ] + %j.36 = phi i32 [ %inc497, %for.inc479 ], [ undef, %if.then466 ] + %mul484 = mul nsw i32 %j.36, %j.36 + %mul491 = mul i32 %j.36, %j.36 + %mul493 = mul i32 %mul491, %mul484 + %add495 = add nsw i32 %mul493, %a2.07 + %inc497 = add nsw i32 %j.36, 1 + br i1 undef, label %for.cond539.preheader, label %for.inc479 + +for.cond539.preheader: + unreachable +} +; CHECK: Determining loop execution counts for: @test3 |