Page MenuHomePhabricator

[IndVars] ICmpInst should not prevent IV widening

Authored by mkazantsev on Nov 27 2020, 12:06 AM.



If we decided to widen IV with zext, then unsigned comparisons
should not prevent widening (same for sext/sign comparisons).
The result of comparison in wider type does not change in this case.

Diff Detail

Event Timeline

mkazantsev created this revision.Nov 27 2020, 12:06 AM
Herald added a project: Restricted Project. · View Herald TranscriptNov 27 2020, 12:06 AM
mkazantsev requested review of this revision.Nov 27 2020, 12:06 AM

I added tests for signed and for ne predicate, but currently they fail even before they reach this code. Can be enabled in follow-ups.

nikic accepted this revision.Nov 29 2020, 4:58 AM


This revision is now accepted and ready to land.Nov 29 2020, 4:58 AM
This revision was automatically updated to reflect the committed changes.