Page MenuHomePhabricator

[AArch64][SME] Avoid going through memory for streaming-compatible splats
ClosedPublic

Authored by sdesmalen on Dec 1 2022, 6:56 AM.

Diff Detail

Event Timeline

sdesmalen created this revision.Dec 1 2022, 6:56 AM
Herald added a project: Restricted Project. · View Herald TranscriptDec 1 2022, 6:56 AM
sdesmalen requested review of this revision.Dec 1 2022, 6:56 AM
Herald added a project: Restricted Project. · View Herald TranscriptDec 1 2022, 6:56 AM
david-arm accepted this revision.Dec 1 2022, 8:02 AM

LGTM! Tres bien!

This revision is now accepted and ready to land.Dec 1 2022, 8:02 AM
paulwalker-arm added inline comments.Dec 1 2022, 8:14 AM
llvm/lib/Target/AArch64/AArch64ISelLowering.cpp
11976–11983

This doesn't look like the correct play to me. We don't support ISD::BUILD_VECTOR for SVE vectors and this extends to the fixed length variety.

I think what's actually missing is custom lowering for ISD::SPLAT_VECTOR for 64/128-bit fixed length vector types, presumably with logic to not low the NumElements == 1 case given that's best scalarised?

This might not yield exactly the same code but is a better starting point.

sdesmalen updated this revision to Diff 479311.Dec 1 2022, 8:39 AM

Address review comment.

paulwalker-arm accepted this revision.Dec 1 2022, 8:54 AM
paulwalker-arm added inline comments.
llvm/test/CodeGen/AArch64/sve-streaming-mode-fixed-length-fp-to-int.ll
722–723

This is an example of where we likely want some special NumElements == 1 handling when lowering splat_vector but that can be done separately.

Matt added a subscriber: Matt.Tue, Jan 10, 3:54 PM