This patch extends LoopVectorize to handle the vectorization of interleaved
memory accesses with scalable vectors when mask is required or/and predicated
tail folding is enabled.
Details
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
I think it would be worthwhile to have a test covering conditional execution inside the original source loop as well as the active lane mask for tail folding. See llvm/test/Transforms/LoopVectorize/interleaved-accesses-masked-group.ll for examples.
llvm/lib/Target/AArch64/AArch64TargetTransformInfo.cpp | ||
---|---|---|
2973–2974 | We could use SVE masking for fixed length as well, but that can be done at a later date if you want. |
llvm/lib/Transforms/Vectorize/LoopVectorize.cpp | ||
---|---|---|
2679 | could you add an assert here: "Unsupported deinterleave factor for scalable vectors"); there is one in line 2731m but this function is called before reaching that line. |
LGTM.
llvm/lib/Transforms/Vectorize/LoopVectorize.cpp | ||
---|---|---|
2688 | Nit: when passing a null or boolean literal into a function, it's customary in LLVM to add an inline comment before it indicating the parameter name, as below. /*FMFSource=*/nullptr would work. |
We could use SVE masking for fixed length as well, but that can be done at a later date if you want.