[PATCH] D100916: [AArch64][GlobalISel] Mark some vector G_ABS cases as legal

Jessica Paquette via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Apr 20 17:55:46 PDT 2021


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

Each of the cases marked as legal here have an imported pattern in AArch64GenGlobalISel.inc. So, if we mark them as legal, we get selection for free.

Technically this is only supposed to happen if we have NEON support. But, we fall back if we don't have that in the legalizer right now. I suppose it'd be better to have a FIXME so we can write the testcase when the time comes.

(Plus, it'd just fall back in selection if NEON isn't available, so it's not *wrong*, I guess?)

This fixes some fallbacks in the test suite.

(Also use `isScalar` from LegalityPredicates.cpp while we're here just to tidy things a little bit.)


https://reviews.llvm.org/D100916

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

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D100916.339063.patch
Type: text/x-patch
Size: 7727 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20210421/238b9b92/attachment.bin>


More information about the llvm-commits mailing list