This is an archive of the discontinued LLVM Phabricator instance.

[IndVarSimplify] use the "canonical" way to infer no-wrap.
ClosedPublic

Authored by sanjoy on Feb 28 2015, 10:39 PM.

Details

Summary

rL225282 introduced an ad-hoc way to promote some additions to nuw or
nsw. Since then SCEV has become smarter in directly proving no-wrap;
and using the canonical "ext(A op B) == ext(A) op ext(B)" method of
proving no-wrap is just as powerful now. Rip out the existing
complexity in favor of getting SCEV to do all the heaving lifting
internally.

This change does not add any unit tests because it is supposed to be a
non-functional change. Tests added in rL225282 and rL226075 are valid
tests for this change.

Diff Detail

Repository
rL LLVM

Event Timeline

sanjoy updated this revision to Diff 20951.Feb 28 2015, 10:39 PM
sanjoy retitled this revision from to [IndVarSimplify] use the "canonical" way to infer no-wrap..
sanjoy updated this object.
sanjoy edited the test plan for this revision. (Show Details)
sanjoy added reviewers: atrick, majnemer.
sanjoy added a subscriber: Unknown Object (MLST).
sanjoy updated this revision to Diff 21138.Mar 3 2015, 1:53 PM

improve a comment

atrick accepted this revision.Mar 3 2015, 3:53 PM
atrick edited edge metadata.

Thank You! Thank You!

This revision is now accepted and ready to land.Mar 3 2015, 3:53 PM
This revision was automatically updated to reflect the committed changes.