[llvm] [SLP]Prefer segmented/deinterleaved loads to strided and fix codegen (PR #135058)
Gaƫtan Bossu via llvm-commits
llvm-commits at lists.llvm.org
Mon Apr 14 02:29:41 PDT 2025
================
@@ -5787,6 +5789,18 @@ BoUpSLP::canVectorizeLoads(ArrayRef<Value *> VL, const Value *VL0,
// Check that the sorted loads are consecutive.
if (static_cast<unsigned>(*Diff) == Sz - 1)
return LoadsState::Vectorize;
+ bool IsMasked;
+ unsigned InterleaveFactor;
+ SmallVector<int> CompressMask;
+ VectorType *LoadVecTy;
----------------
gbossu wrote:
Nit: I think all those new local variables aren't used, and they pollute an already very long function. Maybe create an overloaded `isMaskedLoadCompress` which does not take those "output" parameters, or turn them into pointers that can be `nullptr`.
https://github.com/llvm/llvm-project/pull/135058
More information about the llvm-commits
mailing list