[PATCH] D87654: [AArch64][GlobalISel] Partially port tryShiftAmountMod from AArch64ISelDAGToDAG

Jessica Paquette via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Sep 14 16:41:06 PDT 2020


paquette created this revision.
paquette added a reviewer: aemerson.
Herald added subscribers: danielkiss, hiraditya, kristof.beyls, rovka.
Herald added a project: LLVM.
paquette requested review of this revision.

This ports the AND case from AArch64DAGToDAGISel::tryShiftAmountMod.

This allows us to fold a G_AND into a G_LSHR/G_ASHR/G_SHL. This is possible when the G_AND is against a constant with all ones in the low bits checked by a variable shift instruction.


https://reviews.llvm.org/D87654

Files:
  llvm/lib/Target/AArch64/GISel/AArch64InstructionSelector.cpp
  llvm/test/CodeGen/AArch64/GlobalISel/opt-shift-amount-mod.mir

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D87654.291733.patch
Type: text/x-patch
Size: 14432 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20200914/9ba365c2/attachment.bin>


More information about the llvm-commits mailing list