[llvm] [LV] Support strided load with a stride of -1 (PR #128718)

Mel Chen via llvm-commits llvm-commits at lists.llvm.org
Mon Apr 7 03:55:35 PDT 2025


================
@@ -1115,6 +1115,7 @@ class LoopVectorizationCostModel {
     CM_Widen_Reverse, // For consecutive accesses with stride -1.
     CM_Interleave,
     CM_GatherScatter,
+    CM_Strided,
----------------
Mel-Chen wrote:

Besides the points @alexey-bataev mentioned, strided access might also need to be compared in terms of cost with interleaved access and gather/scatter access. If we encounter a situation where gather/scatter is converted to strided access, that's may workable, but converting interleaved groups to strided access might not be a simple task. Given all of this, I believe continuing with CM_Strided is a more scalable choice.

https://github.com/llvm/llvm-project/pull/128718


More information about the llvm-commits mailing list