This is an archive of the discontinued LLVM Phabricator instance.

[LVI] Exploit nsw/nuw when computing constant ranges
ClosedPublic

Authored by reames on Feb 11 2016, 4:29 PM.

Details

Summary

As the title says. Modelled after similar code in SCEV.

This is useful when analysing induction variables in loops which have been canonicalized by other passes. I wrote the tests as non-loops specifically to avoid the generality introduced in http://reviews.llvm.org/D17174. While that can handle many induction variables without *needing* to exploit nsw, there's no reason not to use it if we've already proven it.

Diff Detail

Repository
rL LLVM

Event Timeline

reames updated this revision to Diff 47748.Feb 11 2016, 4:29 PM
reames retitled this revision from to [LVI] Exploit nsw/nuw when computing constant ranges.
reames updated this object.
reames added reviewers: hfinkel, nlewycky, sanjoy.
reames added a subscriber: llvm-commits.
sanjoy accepted this revision.Feb 11 2016, 4:34 PM
sanjoy edited edge metadata.

lgtm

This revision is now accepted and ready to land.Feb 11 2016, 4:34 PM
This revision was automatically updated to reflect the committed changes.