This is an archive of the discontinued LLVM Phabricator instance.

[LVI] Improve select handling to use condition
ClosedPublic

Authored by reames on Feb 2 2016, 3:15 PM.

Details

Summary

This patches teaches LVI to recognize clamp idioms (e.g. select(a > 5, a, 5) will always produce something greater than 5.

The tests end up being somewhat simplistic because trying to exercise the case I actually care about (a loop with a range check on a clamped secondary induction variable) ends up tripping across a couple of other imprecisions in the analysis. Ah, the joys of LVI...

Diff Detail

Event Timeline

reames updated this revision to Diff 46711.Feb 2 2016, 3:15 PM
reames retitled this revision from to [LVI] Improve select handling to use condition.
reames updated this object.
reames added reviewers: hfinkel, sanjoy, nicholas.
reames added a subscriber: llvm-commits.
sanjoy accepted this revision.Feb 10 2016, 9:13 PM
sanjoy edited edge metadata.

I thought I had LGTM'ed this earlier. Sorry for the delay!

lib/Analysis/LazyValueInfo.cpp
919

From is repeated in the name?

This revision is now accepted and ready to land.Feb 10 2016, 9:13 PM
This revision was automatically updated to reflect the committed changes.