Page MenuHomePhabricator

[SCEV] Be robust against IR generated by simple-loop-unswitch

Authored by reames on Tue, Nov 19, 1:09 PM.



Simple loop unswitch likes to leave around unsimplified and/or/xors. SCEV today bails out on these idioms which is unfortunate in general, and specifically for the unswitch interaction.

Diff Detail

Event Timeline

reames created this revision.Tue, Nov 19, 1:09 PM
fhahn added a subscriber: fhahn.Tue, Nov 19, 2:45 PM
ebrevnov added inline comments.Tue, Nov 19, 11:48 PM

I would expect max BE taken count to be %n as well.

reames marked an inline comment as done.Wed, Nov 20, 10:57 AM
reames added inline comments.

"max backedge-taken count" is always a constant. So, -1 is a constant upper bound on %n implied by the nsw.

This revision is now accepted and ready to land.Thu, Nov 21, 12:55 AM
This revision was automatically updated to reflect the committed changes.