HomePhabricator

[SLP] Make SLPVectorizer to use `llvm.masked.gather` intrinsic

Authored by anton-afanasyev on Oct 30 2020, 12:22 AM.

Description

[SLP] Make SLPVectorizer to use llvm.masked.gather intrinsic

For the scattered operands of load instructions it makes sense
to use gathering load intrinsic, which can lower to native instruction
for X86/AVX512 and ARM/SVE. This also enables building
vectorization tree with entries containing scattered operands.
The next step is to add scattered store.

Fixes PR47629 and PR47623

Differential Revision: https://reviews.llvm.org/D90445