diff options
| author | Sanjoy Das <sanjoy@playingwithpointers.com> | 2015-03-09 21:43:43 +0000 |
|---|---|---|
| committer | Sanjoy Das <sanjoy@playingwithpointers.com> | 2015-03-09 21:43:43 +0000 |
| commit | 91b5477aadb5f6ed44afb18588a057e308a2fc4c (patch) | |
| tree | 9f5a7373170e33b6bbe944c538d37d5091f5defd /llvm/lib/CodeGen/SelectionDAG/StatepointLowering.cpp | |
| parent | f25745298635eb0f30967fc87e3597e3e9f9a129 (diff) | |
| download | bcm5719-llvm-91b5477aadb5f6ed44afb18588a057e308a2fc4c.tar.gz bcm5719-llvm-91b5477aadb5f6ed44afb18588a057e308a2fc4c.zip | |
[SCEV] Unify getUnsignedRange and getSignedRange
Summary:
This removes some duplicated code, and also helps optimization: e.g. in
the test case added, `%idx ULT 128` in `@x` is not currently optimized
to `true` by `-indvars` but will be, after this change.
The only functional change in ths commit is that for add recurrences,
ScalarEvolution::getRange will be more aggressive -- computing the
unsigned (resp. signed) range for a SCEVAddRecExpr will now look at the
NSW (resp. NUW) bits and check for signed (resp. unsigned) overflow.
This can be a strict improvement in some cases (such as the attached
test case), and should be no worse in other cases.
Reviewers: atrick, nlewycky
Subscribers: llvm-commits
Differential Revision: http://reviews.llvm.org/D8142
llvm-svn: 231709
Diffstat (limited to 'llvm/lib/CodeGen/SelectionDAG/StatepointLowering.cpp')
0 files changed, 0 insertions, 0 deletions

