[all-commits] [llvm/llvm-project] 7212f6: [AArch64][GlobalISel] Fold G_LSHR into test bit ca...

Jessica Paquette via All-commits all-commits at lists.llvm.org
Wed Feb 5 15:14:29 PST 2020


  Branch: refs/heads/master
  Home:   https://github.com/llvm/llvm-project
  Commit: 7212f65784c12cd2e01c909b43e2c4c597637195
      https://github.com/llvm/llvm-project/commit/7212f65784c12cd2e01c909b43e2c4c597637195
  Author: Jessica Paquette <jpaquette at apple.com>
  Date:   2020-02-05 (Wed, 05 Feb 2020)

  Changed paths:
    M llvm/lib/Target/AArch64/AArch64InstructionSelector.cpp
    M llvm/test/CodeGen/AArch64/GlobalISel/opt-fold-shift-tbz-tbnz.mir

  Log Message:
  -----------
  [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




More information about the All-commits mailing list