Page MenuHomePhabricator

[AArch64][GlobalISel] Fold G_ASHR into TB(N)Z bit calculation

Authored by paquette on Feb 3 2020, 3:15 PM.



This implements walking over G_ASHR in the same way as getTestBitOperand in AArch64ISelLowering.

(tbz (ashr x, c), b) -> (tbz x, b+c) or (tbz x, msb) if b+c is > # bits in x

Diff Detail

Event Timeline

paquette created this revision.Feb 3 2020, 3:15 PM
aemerson accepted this revision.Feb 5 2020, 9:53 AM

LGTM with nit.


Can you factor our these getType() calls here and in the G_SHL case into a variable?

This revision is now accepted and ready to land.Feb 5 2020, 9:53 AM
This revision was automatically updated to reflect the committed changes.