Page MenuHomePhabricator

[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

Unit TestsFailed

TimeTest
410 mslinux > HWAddressSanitizer-x86_64.TestCases::sizes.cpp
Script: -- : 'RUN: at line 3'; /mnt/disks/ssd0/agent/llvm-project/build/./bin/clang --driver-mode=g++ -m64 -gline-tables-only -fsanitize=hwaddress -fuse-ld=lld -mcmodel=large -mllvm -hwasan-globals -mllvm -hwasan-use-short-granules -mllvm -hwasan-instrument-landing-pads=0 -mllvm -hwasan-instrument-personality-functions /mnt/disks/ssd0/agent/llvm-project/compiler-rt/test/hwasan/TestCases/sizes.cpp -nostdlib++ -lstdc++ -o /mnt/disks/ssd0/agent/llvm-project/build/projects/compiler-rt/test/hwasan/X86_64/TestCases/Output/sizes.cpp.tmp

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