================
@@ -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;
----------------
eas wrote:

I don't like hardcoding this here. The stride restriction is coming from the 
descriptor implementation, and if we remove it there there is no "easy" way to 
find this line. I believe `const DenseMap<Instruction *, const SCEV *> 
&getCompressedMemoryOps()` contains enough data to make stride computation here 
generic already so that we could at least assert for `Stride == 1`.

https://github.com/llvm/llvm-project/pull/214491
_______________________________________________
llvm-branch-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits

Reply via email to