This is an archive of the discontinued LLVM Phabricator instance.

[IRCE] Temporarily disable unsigned latch conditions by default
ClosedPublic

Authored by mkazantsev on Oct 3 2017, 10:09 PM.

Details

Summary

We have found some corner cases connected to range intersection where IRCE makes
a bad thing when the latch condition is unsigned. The fix for that will go as a follow up.
This patch temporarily disables IRCE for unsigned latch conditions until the issue is fixed.

The unsigned latch conditions were introduced to IRCE by rL310027.

Diff Detail

Repository
rL LLVM

Event Timeline

mkazantsev created this revision.Oct 3 2017, 10:09 PM
reames accepted this revision.Oct 3 2017, 10:15 PM

LGTM w/the following changes made: add a test case which demonstrates the miscompile and update the description to reference the original problematic commit.

This revision is now accepted and ready to land.Oct 3 2017, 10:15 PM
mkazantsev edited the summary of this revision. (Show Details)
This revision was automatically updated to reflect the committed changes.
reames added inline comments.Oct 4 2017, 10:44 AM
llvm/trunk/test/Transforms/IRCE/range_intersect_miscompile.ll
3

This comment needs clarified. It reads as if this is an active miscompile. After you disabled the unsigned latch case, this is no longer active.

Another way of structuring this would be to write the test using the off-by-default output and check the incorrect output matches what you expect. Then you'd have a test case to edit to show the effect of fixing the miscompile when you re-enable the unsigned latch.