This is an archive of the discontinued LLVM Phabricator instance.

[IRCE] Remove folding of two range checks into RANGE_CHECK_BOTH
ClosedPublic

Authored by mkazantsev on Nov 3 2017, 2:45 AM.

Details

Summary

The logic of replacing of a couple RANGE_CHECK_LOWER + RANGE_CHECK_UPPER
into RANGE_CHECK_BOTH in fact duplicates the logic of range intersection which
happens when we calculate safe iteration space. Effectively, the result of intersection of
these ranges doesn't differ from the range of merged range check.

We chose to remove duplicating logic in favor of code simplicity.

Diff Detail

Repository
rL LLVM

Event Timeline

mkazantsev created this revision.Nov 3 2017, 2:45 AM
reames accepted this revision.Nov 7 2017, 3:50 PM

LGTM, but please land a day or two separate from any other change. i.e. if this exposes problems (pass ordering?) let's make that obvious.

This revision is now accepted and ready to land.Nov 7 2017, 3:50 PM
This revision was automatically updated to reflect the committed changes.