[llvm-branch-commits] [llvm] [LoopVectorize] Support vectorization of compressing patterns (PR #214491)
Benjamin Maxwell via llvm-branch-commits
llvm-branch-commits at lists.llvm.org
Tue Aug 18 06:12:56 PDT 2026
================
@@ -2649,8 +2663,11 @@ LoopVectorizationCostModel::memoryInstructionCanBeWidened(Instruction *I,
auto *Ptr = getLoadStorePointerOperand(I);
auto *ScalarTy = getLoadStoreType(I);
- // In order to be widened, the pointer should be consecutive, first of all.
+ // In order to be widened, the pointer should be consecutive or compressed.
int Stride = Legal->isConsecutivePtr(ScalarTy, Ptr);
+ if (!Stride && Legal->isCompressedLoadOrStore(I))
+ Stride = 1;
----------------
MacDue wrote:
Sure, I've updated `isConsecutivePtr()`. It does require some LAA changes (but they're needed later to allow vectorization in more cases later anyway -- though that is not handled in this patch).
https://github.com/llvm/llvm-project/pull/214491
More information about the llvm-branch-commits
mailing list