This is an archive of the discontinued LLVM Phabricator instance.

[AArch64] Expand UADDLV patterns to SADDLV
ClosedPublic

Authored by dmgreen on Jan 25 2022, 5:14 AM.

Details

Summary

We already had some patterns for UADDV(UADDLP(x)) -> UADDLV(x), this simply expands them to the signed instructions by re-using the tablegen patterns.

Diff Detail

Event Timeline

dmgreen created this revision.Jan 25 2022, 5:14 AM
dmgreen requested review of this revision.Jan 25 2022, 5:14 AM
Herald added a project: Restricted Project. · View Herald TranscriptJan 25 2022, 5:14 AM
labrinea added inline comments.Jan 25 2022, 8:55 AM
llvm/lib/Target/AArch64/AArch64InstrInfo.td
5883

We seem to have patterns for all of 8B, 16B, 8H, 4H and 4S if I read this right. I am seeing tests (in the diff at least) that only cover 4S, 8H and 16B (datasize = 128). Do we have/need tests for the rest (datasize = 64)?

6081–6082

The multiclass naming confuses me a bit. We also have these other patterns here for SADDLV and UADDLV. Not sure what would be a better naming scheme.

labrinea set the repository for this revision to rG LLVM Github Monorepo.Jan 26 2022, 4:55 AM
dmgreen updated this revision to Diff 403562.Jan 27 2022, 2:52 AM
dmgreen added inline comments.
llvm/lib/Target/AArch64/AArch64InstrInfo.td
5883

Yeah some of the extending vecreduce patterns don't simplify in the same way. Those will have to be left for another patch though. I've made sure there is test coverage.

6081–6082

Yeah I just made up a name to do with Across Lane (addv) and pairwise (addlp).

labrinea accepted this revision.Jan 28 2022, 3:01 AM
labrinea added inline comments.
llvm/lib/Target/AArch64/AArch64InstrInfo.td
5883

Alright, looks good.

This revision is now accepted and ready to land.Jan 28 2022, 3:01 AM
This revision was landed with ongoing or failed builds.Feb 4 2022, 6:07 AM
This revision was automatically updated to reflect the committed changes.