[llvm] [IA][RISCV] Recognize deinterleaved loads that could lower to strided segmented loads (PR #151612)
Luke Lau via llvm-commits
llvm-commits at lists.llvm.org
Wed Aug 6 10:02:49 PDT 2025
================
@@ -3209,10 +3209,12 @@ class LLVM_ABI TargetLoweringBase {
/// \p Shuffles is the shufflevector list to DE-interleave the loaded vector.
/// \p Indices is the corresponding indices for each shufflevector.
/// \p Factor is the interleave factor.
+ /// \p MaskFactor is the interleave factor that considers mask, which can
+ /// reduce the original factor.
virtual bool lowerInterleavedLoad(Instruction *Load, Value *Mask,
ArrayRef<ShuffleVectorInst *> Shuffles,
- ArrayRef<unsigned> Indices,
- unsigned Factor) const {
+ ArrayRef<unsigned> Indices, unsigned Factor,
+ unsigned MaskFactor) const {
return false;
----------------
lukel97 wrote:
Oh whoops yes, that should be multiplied by factor.
To me MaskFactor feels like a concept internal to InterleavedAccessPass that's leaking through.
I'm not strongly opinionated about this though, just thought I'd throw the idea out there, happy to go with what you prefer.
I guess an alternative is that we could also add a separate "lowerStridedInterleaved" TTI hook. But maybe that will lead to hook explosion again
https://github.com/llvm/llvm-project/pull/151612
More information about the llvm-commits
mailing list