diff options
| author | Nick Lewycky <nicholas@mxc.ca> | 2008-11-03 02:43:49 +0000 |
|---|---|---|
| committer | Nick Lewycky <nicholas@mxc.ca> | 2008-11-03 02:43:49 +0000 |
| commit | 7b14e20a5e83d3f5a076f12be1e6f42a1a222566 (patch) | |
| tree | 218bc5f5b9367fa598cd2ea13cea3cec71b9ce25 /llvm/test/Analysis/ScalarEvolution | |
| parent | b067843863214ebd9032481e57605b181a198943 (diff) | |
| download | bcm5719-llvm-7b14e20a5e83d3f5a076f12be1e6f42a1a222566.tar.gz bcm5719-llvm-7b14e20a5e83d3f5a076f12be1e6f42a1a222566.zip | |
Don't crash analyzing certain quadratics (addrec of {X,+,Y,+,1}).
We're still waiting on code that actually analyzes them properly.
llvm-svn: 58592
Diffstat (limited to 'llvm/test/Analysis/ScalarEvolution')
| -rw-r--r-- | llvm/test/Analysis/ScalarEvolution/2008-11-02-QuadraticCrash.ll | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/llvm/test/Analysis/ScalarEvolution/2008-11-02-QuadraticCrash.ll b/llvm/test/Analysis/ScalarEvolution/2008-11-02-QuadraticCrash.ll new file mode 100644 index 00000000000..c6cb87fca14 --- /dev/null +++ b/llvm/test/Analysis/ScalarEvolution/2008-11-02-QuadraticCrash.ll @@ -0,0 +1,21 @@ +; RUN: llvm-as < %s | opt -analyze -scalar-evolution +; PR1827 + +declare void @use(i32) + +define void @foo() { +entry: + br label %loop_1 + +loop_1: ; preds = %loop_1, %entry + %a = phi i32 [ 2, %entry ], [ %b, %loop_1 ] ; <i32> [#uses=2] + %c = phi i32 [ 5, %entry ], [ %d, %loop_1 ] ; <i32> [#uses=1] + %b = add i32 %a, 1 ; <i32> [#uses=1] + %d = add i32 %c, %a ; <i32> [#uses=3] + %A = icmp ult i32 %d, 50 ; <i1> [#uses=1] + br i1 %A, label %loop_1, label %endloop + +endloop: ; preds = %loop_1 + call void @use(i32 %d) + ret void +} |

