This is an archive of the discontinued LLVM Phabricator instance.

[AArch64][GlobalISel] Select trn1 and trn2
ClosedPublic

Authored by paquette on Jun 4 2020, 11:47 AM.

Details

Summary

Same idea as for zip, uzp, etc. Teach the post-legalizer combiner to recognize G_SHUFFLE_VECTORs that are trn1/trn2 instructions.

  • Add G_TRN1 and G_TRN2
  • Port mask matching code from AArch64ISelLowering
  • Produce G_TRN1 and G_TRN2 in the post-legalizer combiner
  • Select via importer

Add select-trn.mir to test selection.

Add postlegalizer-combiner-trn.mir to test the combine. This is similar to the existing arm64-trn test.

Note that both of these tests contain things we currently don't legalize.

I figured it would be easier to test these now rather than later, since once we legalize the G_SHUFFLE_VECTORs, it's not guaranteed that someone will update the tests.

Diff Detail

Event Timeline

paquette created this revision.Jun 4 2020, 11:47 AM
aemerson accepted this revision.Jun 8 2020, 4:13 PM

LGTM.

This revision is now accepted and ready to land.Jun 8 2020, 4:13 PM
This revision was automatically updated to reflect the committed changes.