This is an archive of the discontinued LLVM Phabricator instance.

[SVE] Remove custom lowering of scalable vector MGATHER & MSCATTER operations.
ClosedPublic

Authored by paulwalker-arm on May 23 2022, 4:13 PM.

Diff Detail

Event Timeline

paulwalker-arm created this revision.May 23 2022, 4:13 PM
Herald added a project: Restricted Project. · View Herald Transcript
paulwalker-arm requested review of this revision.May 23 2022, 4:13 PM
Herald added a project: Restricted Project. · View Herald TranscriptMay 23 2022, 4:13 PM

I can't quite decide if this is better or worse than the current implementation as much of the target specific gather/scatter code remains. My hope is there's value in lowering the intrinsics to stock ISD::MGATHER/ISD::MCATTER operations early, thus forcing all normal gather/scatter operations down the same path.

Nice cleanup.

llvm/lib/Target/AArch64/AArch64InstrInfo.td
552–557

I don't think there's anything SVE specific about these nodes or the corresponding PatFrags. Can you make this a generic node in include/llvm/Target/TargetSelectionDAG.td and possibly move the PatFrags as well? (same question for gather)

paulwalker-arm added inline comments.May 24 2022, 3:08 AM
llvm/lib/Target/AArch64/AArch64InstrInfo.td
552–557

It's the SDTCVecEltisVT<1, i1> part that make theses target specific because not all targets have predicate vectors and thus can represent the mask as an ordinary integer vector. That said, looking at masked_ld I can see they just omit element parsing for that parameter so I can do likewise.

Matt added a subscriber: Matt.May 25 2022, 2:06 PM

Restructured PatFrags to maximise code reuse.

sdesmalen accepted this revision.May 31 2022, 1:37 AM

Thanks for making these PatFrags largely generic!

This revision is now accepted and ready to land.May 31 2022, 1:37 AM
This revision was landed with ongoing or failed builds.Jun 2 2022, 3:28 AM
This revision was automatically updated to reflect the committed changes.