diff options
| author | Sanjoy Das <sanjoy@playingwithpointers.com> | 2014-11-13 00:00:58 +0000 |
|---|---|---|
| committer | Sanjoy Das <sanjoy@playingwithpointers.com> | 2014-11-13 00:00:58 +0000 |
| commit | c5676df3ecb7cfe4f4916af73a9d5f5f76788c05 (patch) | |
| tree | 188010b064113322d5badf277c389b1691320465 /llvm/test/Transforms/IndVarSimplify/widen-loop-comp.ll | |
| parent | 5357c0813bb98609e324ba26a96f713513c54e56 (diff) | |
| download | bcm5719-llvm-c5676df3ecb7cfe4f4916af73a9d5f5f76788c05.tar.gz bcm5719-llvm-c5676df3ecb7cfe4f4916af73a9d5f5f76788c05.zip | |
Teach ScalarEvolution to sharpen range information.
If x is known to have the range [a, b), in a loop predicated by (icmp
ne x, a) its range can be sharpened to [a + 1, b). Get
ScalarEvolution and hence IndVars to exploit this fact.
This change triggers an optimization to widen-loop-comp.ll, so it had
to be edited to get it to pass.
This change was originally landed in r219834 but had a bug and broke
ASan. It was reverted in r219878, and is now being re-landed after
fixing the original bug.
phabricator: http://reviews.llvm.org/D5639
reviewed by: atrick
llvm-svn: 221839
Diffstat (limited to 'llvm/test/Transforms/IndVarSimplify/widen-loop-comp.ll')
| -rw-r--r-- | llvm/test/Transforms/IndVarSimplify/widen-loop-comp.ll | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/llvm/test/Transforms/IndVarSimplify/widen-loop-comp.ll b/llvm/test/Transforms/IndVarSimplify/widen-loop-comp.ll index bfe74afe894..0930a0c4139 100644 --- a/llvm/test/Transforms/IndVarSimplify/widen-loop-comp.ll +++ b/llvm/test/Transforms/IndVarSimplify/widen-loop-comp.ll @@ -67,8 +67,7 @@ for.end: define void @test2([8 x i8]* %a, i8* %b, i8 %limit) { entry: %conv = zext i8 %limit to i32 - %cmp23 = icmp eq i8 %limit, 0 - br i1 %cmp23, label %for.cond1.preheader, label %for.cond1.preheader.us + br i1 undef, label %for.cond1.preheader, label %for.cond1.preheader.us for.cond1.preheader.us: %storemerge5.us = phi i32 [ 0, %entry ], [ %inc14.us, %for.inc13.us ] |

