[llvm] [LV][EVL] Generate negative strided load/store for reversed load/store (PR #123608)

Florian Hahn via llvm-commits llvm-commits at lists.llvm.org
Tue Jan 21 01:05:38 PST 2025


================
@@ -1776,6 +1776,10 @@ class TargetTransformInfo {
   /// otherwise scalar epilogue loop.
   bool preferEpilogueVectorization() const;
 
+  /// Return true if the loop vectorizer prefer strided load/store when
+  /// vectorizing reversed load/store.
+  bool preferStridedLoadStore() const;
----------------
fhahn wrote:

maybe more generally, why do we need such a helper at all? Could we not query the cost of the strided & reverse versions and just select the best one when the recipe is constructed?

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


More information about the llvm-commits mailing list