[PATCH] D74077: [AArch64][GlobalISel] Fold G_LSHR into test bit calculation

Jessica Paquette via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Feb 5 10:34:11 PST 2020


paquette created this revision.
paquette added a reviewer: aemerson.
Herald added subscribers: Petar.Avramovic, hiraditya, kristof.beyls, rovka.
Herald added a project: LLVM.

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


https://reviews.llvm.org/D74077

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

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D74077.242687.patch
Type: text/x-patch
Size: 5220 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20200205/0ffd721d/attachment.bin>


More information about the llvm-commits mailing list