HomePhabricator

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

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

Description

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

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

Differential Revision: https://reviews.llvm.org/D74077