This is an archive of the discontinued LLVM Phabricator instance.

[SLP] Make SLPVectorizer to use `llvm.masked.scatter` intrinsic
Changes PlannedPublic

Authored by anton-afanasyev on Nov 21 2020, 11:03 AM.

Details

Summary

This is symmetrical to fcad8d3635c commit adding llvm.masked.gather.
For the scattered operands of store instructions it makes sense
to use scattered store intrinsic, which can lower to native instruction
for X86/AVX512 and ARM/SVE. This also enables building
vectorization tree with entries containing scattered operands.

Actually NFC now, since stores could be only seed entry, but we
collect only consecutive stores there for now. It will be changed
in future commits.

Diff Detail

Event Timeline

anton-afanasyev requested review of this revision.Nov 21 2020, 11:03 AM

Align fix. Style fix.

Actually NFC now, since stores could be only seed entry, but we collect only consecutive stores there for now. It will be changed in future commits.

Are you looking at supporting non-consecutive stores? This patch probably shouldn't be reviewed until we actually have something that uses and tests it.

anton-afanasyev planned changes to this revision.Dec 8 2020, 4:57 AM

Actually NFC now, since stores could be only seed entry, but we collect only consecutive stores there for now. It will be changed in future commits.

Are you looking at supporting non-consecutive stores? This patch probably shouldn't be reviewed until we actually have something that uses and tests it.

Yes, I've planned to add such stores generation at the next step. But you're right, better to do this together with this step.

Please add tests