[PATCH] D99224: [AArch64][GlobalISel] Select G_SBFX and G_UBFX

Jessica Paquette via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Mar 23 15:55:34 PDT 2021


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

Add selection support for G_SBFX and G_UBFX and add a test.

These must always have a constant LSB and width.

Usually real SBFX/UBFX instructions have some requirements on the LSB/width operands (e.g. `sbfx x, 31, 31` probably isn't allowed.) However, it seems like these are ultimately selected down to a sane instruction (e.g. `asr`) anyway. (See: https://godbolt.org/z/7KeeaerWG)


https://reviews.llvm.org/D99224

Files:
  llvm/lib/Target/AArch64/GISel/AArch64InstructionSelector.cpp
  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: D99224.332809.patch
Type: text/x-patch
Size: 5903 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20210323/ac42f89f/attachment.bin>


More information about the llvm-commits mailing list