This is an archive of the discontinued LLVM Phabricator instance.

[AArch64][GlobalISel] Mark some vector G_ABS cases as legal
ClosedPublic

Authored by paquette on Apr 20 2021, 5:55 PM.

Details

Summary

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.)

Diff Detail

Event Timeline

paquette created this revision.Apr 20 2021, 5:55 PM
paquette requested review of this revision.Apr 20 2021, 5:55 PM
Herald added a project: Restricted Project. · View Herald TranscriptApr 20 2021, 5:55 PM
aemerson accepted this revision.Apr 21 2021, 5:38 PM
aemerson added inline comments.
llvm/lib/Target/AArch64/GISel/AArch64LegalizerInfo.cpp
692

You can use the PackedVectorAllTypeList variable for this I think.

This revision is now accepted and ready to land.Apr 21 2021, 5:38 PM