Page MenuHomePhabricator

[LoopIdiom] 'left-shift until bittest' idiom: support constant bit mask
ClosedPublic

Authored by lebedev.ri on Nov 18 2020, 10:28 AM.

Details

Summary

The handing of the case where the mask is a constant is trivial,
if said constant is a power of two, the bit in question is log2(mask),
rest just works.

Diff Detail

Event Timeline

lebedev.ri created this revision.Nov 18 2020, 10:28 AM

Do recurrence analysis afterwards, not when matching backedge condition.

lebedev.ri updated this revision to Diff 309875.Dec 7 2020, 4:40 AM

Rebased, NFC.

Rebased, NFC.

Rebased, NFC.

This revision is now accepted and ready to land.Wed, Dec 23, 9:39 AM

LGTM

Thank you for the review!

Rebased, NFC.

This revision was landed with ongoing or failed builds.Wed, Dec 23, 11:28 AM
This revision was automatically updated to reflect the committed changes.