This is an archive of the discontinued LLVM Phabricator instance.

[AArch64][SVE] Add ISel pattern to lower DUPLANE128 to LD1RQD
ClosedPublic

Authored by MattDevereau on Jul 18 2022, 7:27 AM.

Details

Summary

Following on from https://reviews.llvm.org/D128902, lower DUPLANE128 to LD1RQD for integer load types from instruction selection.

Diff Detail

Event Timeline

MattDevereau created this revision.Jul 18 2022, 7:27 AM
MattDevereau requested review of this revision.Jul 18 2022, 7:27 AM
Herald added a project: Restricted Project. · View Herald TranscriptJul 18 2022, 7:27 AM
paulwalker-arm added inline comments.Jul 18 2022, 7:44 AM
llvm/lib/Target/AArch64/AArch64SVEInstrInfo.td
878–880

Is there a reason not to add the floating point patterns, especially since you've got the tests to show they'll just work? Also see LD1RPat as you likely want to do something similar and I think it's worth having the related logic bunched together.

llvm/test/CodeGen/AArch64/sve-intrinsics-perm-select.ll
584–594

See my last comment on D129758, I think you want to keep these to show the need for the later DAG combine?

paulwalker-arm added inline comments.Jul 18 2022, 8:22 AM
llvm/test/CodeGen/AArch64/sve-intrinsics-perm-select.ll
584–594

Discussed offline. It seems all floating point vector splats are being bitcasted from integer vector loads regardless of the input being constant and so these tests are redundant.

llvm/test/CodeGen/AArch64/sve-ld1r.ll
726

Given we can drop the constant tests entirely, you can drop the _ptr from the function names if you want.

MattDevereau added inline comments.Jul 18 2022, 9:26 AM
llvm/lib/Target/AArch64/AArch64SVEInstrInfo.td
878–880

Discussed offline, this would need a bitcast added to the pattern for the load result and these patterns would be removed by child revision https://reviews.llvm.org/D130013

Dropped _ldr from test names and moved Pats into class

Matt added a subscriber: Matt.Jul 18 2022, 11:28 AM
paulwalker-arm accepted this revision.Jul 19 2022, 5:58 AM
paulwalker-arm added inline comments.
llvm/lib/Target/AArch64/AArch64SVEInstrInfo.td
880

Looks like an overly large indent.

This revision is now accepted and ready to land.Jul 19 2022, 5:58 AM