[PATCH] D102656: [AArch64][GlobalISel] Prefer mov for s32->s64 G_ZEXT

Jessica Paquette via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon May 17 16:08:46 PDT 2021


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

We can use an ORRWrs (mov) + SUBREG_TO_REG rather than a UBFX for G_ZEXT on
s32->s64.

This closer matches what SDAG does, and is likely more power efficient etc.

(Also fixed up arm64-rev.ll which had a fallback check line which was entirely useless.)

Simple example: https://godbolt.org/z/h1jKKdx5c


https://reviews.llvm.org/D102656

Files:
  llvm/lib/Target/AArch64/GISel/AArch64InstructionSelector.cpp
  llvm/test/CodeGen/AArch64/GlobalISel/opt-fold-ext-tbz-tbnz.mir
  llvm/test/CodeGen/AArch64/GlobalISel/select-cmp.mir
  llvm/test/CodeGen/AArch64/GlobalISel/select-int-ext.mir
  llvm/test/CodeGen/AArch64/GlobalISel/select-redundant-zext.mir
  llvm/test/CodeGen/AArch64/arm64-rev.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D102656.346008.patch
Type: text/x-patch
Size: 27903 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20210517/7e429021/attachment.bin>


More information about the llvm-commits mailing list