This is an archive of the discontinued LLVM Phabricator instance.

Generalize icmp matching in IndVars' eliminateTrunc
ClosedPublic

Authored by reames on Jun 10 2019, 5:47 PM.

Details

Summary

We were only matching RHS being a loop invariant value, not the inverse. Since there's nothing which appears to canonicalize loop invariant values to RHS, this means we missed cases.

Note: There's partial overlap between this transform and LFTR. That may worthy some deeper thinking, but for the moment, let's leave the design as is, and just make it work properly.

Diff Detail

Repository
rL LLVM

Event Timeline

reames created this revision.Jun 10 2019, 5:47 PM
Herald added a project: Restricted Project. · View Herald TranscriptJun 10 2019, 5:47 PM
apilipenko accepted this revision.Jun 11 2019, 3:07 PM
This revision is now accepted and ready to land.Jun 11 2019, 3:07 PM
This revision was automatically updated to reflect the committed changes.