This is an archive of the discontinued LLVM Phabricator instance.

[AArch64][GlobalISel] Fold G_LSHR into test bit calculation
ClosedPublic

Authored by paquette on Feb 5 2020, 10:29 AM.

Details

Summary

Add support for walking through G_LSHR in getTestBitReg. Equivalent to the code in getTestBitOperand in AArch64ISelLowering.

(tbz (lshr x, c), b) -> (tbz x, b+c) when b + c is < # bits in x

Diff Detail

Event Timeline

paquette created this revision.Feb 5 2020, 10:29 AM
aemerson accepted this revision.Feb 5 2020, 3:03 PM

LGTM.

This revision is now accepted and ready to land.Feb 5 2020, 3:03 PM
This revision was automatically updated to reflect the committed changes.