[PATCH] D107013: [AArch64][GlobalISel] Improve legalization for odd-type G_LOAD

Jessica Paquette via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Jul 28 16:10:00 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.

Swap the order of widening so that we widen to the next power-of-2 first when legalizing G_LOAD.

Also, provide a minimum type for the power of 2 to disallow s2 + s1. Clamping ought to disallow s2 and s1, but I think it's better to be explicit about the expected minimum size.

We probably need a similar change for G_STORE, but it seems to be a bit more finnicky. So, let's just handle G_LOAD for now.


https://reviews.llvm.org/D107013

Files:
  llvm/lib/Target/AArch64/GISel/AArch64LegalizerInfo.cpp
  llvm/test/CodeGen/AArch64/GlobalISel/legalize-load-store.mir

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D107013.362576.patch
Type: text/x-patch
Size: 7908 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20210728/2eacf8d9/attachment.bin>


More information about the llvm-commits mailing list