This is an archive of the discontinued LLVM Phabricator instance.

[AArch64][GlobalISel] Select llvm.aarch64.neon.st2 intrinsics
ClosedPublic

Authored by paquette on Jul 19 2021, 6:37 PM.

Details

Summary

Add manual selection code similar to the code in AArch64ISelDAGToDAG, and add createTuple helpers similar to the code there as well.

This accounted for around 111 fallbacks while building clang for AArch64 with GlobalISel.

This also should make it easy to add selection code for other store intrinsics.

As a minor cleanup, this uses createQTuple in the other place where we use REG_SEQUENCE.

https://godbolt.org/z/5cn4MMGo3

Diff Detail

Event Timeline

paquette created this revision.Jul 19 2021, 6:37 PM
paquette requested review of this revision.Jul 19 2021, 6:37 PM
Herald added a project: Restricted Project. · View Herald TranscriptJul 19 2021, 6:37 PM
jroelofs accepted this revision.Jul 19 2021, 6:59 PM
jroelofs added inline comments.
llvm/test/CodeGen/AArch64/GlobalISel/select-st2.mir
244

It's so weird to me that the st2 intrinsic generates an st1 instruction, but SDAG does it so... 🤷‍♂️

This revision is now accepted and ready to land.Jul 19 2021, 6:59 PM
This revision was landed with ongoing or failed builds.Jul 20 2021, 1:24 PM
This revision was automatically updated to reflect the committed changes.
craig.topper added inline comments.
llvm/lib/Target/AArch64/GISel/AArch64InstructionSelector.cpp
5082

I suspect you meant || here. I'm getting a warning from gcc "warning: suggest parentheses around comparison in operand of ‘|’ [-Wparentheses]"

paquette added inline comments.Jul 21 2021, 2:56 PM
llvm/lib/Target/AArch64/GISel/AArch64InstructionSelector.cpp
5082

Oh, yes, you're right. Will fix shortly.