[PATCH] D108240: [AArch64][GlobalISel] Legalize 32-bit + narrow G_SMULO + G_UMULO

Jessica Paquette via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Aug 17 14:11:55 PDT 2021


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

SDAG lowers 32-bit and 64-bit G_SMULO + G_UMULO. We were missing the 32-bit case.

For other sizes, make the 0th type a power of 2 and clamp it to either 32 bits or 64 bits.

Right now, this will allow us to handle narrow types (e.g. s4, s24, etc.). The LegalizerHelper doesn't support narrowing G_SMULO or G_UMULO right now. I think we want clamping behaviour either way, so we might as well include it now to be explicit.


https://reviews.llvm.org/D108240

Files:
  llvm/lib/Target/AArch64/GISel/AArch64LegalizerInfo.cpp
  llvm/test/CodeGen/AArch64/GlobalISel/legalize-mul.mir
  llvm/test/CodeGen/AArch64/GlobalISel/legalizer-info-validation.mir

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D108240.367010.patch
Type: text/x-patch
Size: 7081 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20210817/680032f6/attachment.bin>


More information about the llvm-commits mailing list