This is an archive of the discontinued LLVM Phabricator instance.

[AArch64][GlobalISel] Use custom legalization for G_TRUNC for v8i8 vectors
ClosedPublic

Authored by aemerson on Sep 23 2020, 4:31 PM.

Details

Summary

Truncating to v8i8 is a case where we want to split the source but also generate intermediate truncates to reduce the size of the source vector before truncating down to v8i8. This implements the same strategy as what SelectionDAG does, but I'm not certain where if anywhere in generic code it should live.

Use it for legalization of v8s8 = G_ICMP v8s32.

Diff Detail

Event Timeline

aemerson created this revision.Sep 23 2020, 4:31 PM
arsenm added inline comments.Sep 23 2020, 4:43 PM
llvm/lib/Target/AArch64/GISel/AArch64LegalizerInfo.cpp
742–747

I don't think there's anything really custom here

aemerson added inline comments.Sep 24 2020, 7:54 AM
llvm/lib/Target/AArch64/GISel/AArch64LegalizerInfo.cpp
742–747

Do you have a suggestion of where this could live? narrowScalar?

This revision was not accepted when it landed; it landed in state Needs Review.Oct 1 2020, 1:30 PM
This revision was landed with ongoing or failed builds.
This revision was automatically updated to reflect the committed changes.