[PATCH] D101543: [AArch64][GlobalISel] Fix width value for G_SBFX/G_UBFX

Brendon Cahoon via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Apr 29 09:20:19 PDT 2021


bcahoon created this revision.
bcahoon added a reviewer: paquette.
Herald added subscribers: danielkiss, hiraditya, kristof.beyls, rovka.
bcahoon requested review of this revision.
Herald added a project: LLVM.
Herald added a subscriber: llvm-commits.

When creating G_SBFX/G_UBFX opcodes, specify the last operand
as a width instead of the bit position. The bit position is used for
the AArch64 SBFM and UBFM instructions. Then, the bit position
is converted to a width if the SBFX/UBFX aliases are generated, but
the bit position is used for creating other aliases, such as the shifts.

See https://llvm.org/docs/GlobalISel/GenericOpcode.html#g-sbfx-g-ubfx
for the opcode definition.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D101543

Files:
  llvm/lib/Target/AArch64/GISel/AArch64InstructionSelector.cpp
  llvm/lib/Target/AArch64/GISel/AArch64PostLegalizerCombiner.cpp
  llvm/test/CodeGen/AArch64/GlobalISel/form-bitfield-extract-from-sextinreg.mir
  llvm/test/CodeGen/AArch64/GlobalISel/select-sbfx.mir
  llvm/test/CodeGen/AArch64/GlobalISel/select-ubfx.mir

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D101543.341539.patch
Type: text/x-patch
Size: 7898 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20210429/17fb1a8b/attachment.bin>


More information about the llvm-commits mailing list