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

Shih-Po Hung via llvm-commits llvm-commits at lists.llvm.org
Thu Jan 23 21:59:52 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;
----------------
arcbbb wrote:

I think we probably need a cost-based decision since the consecutive load followed by a vrgather could potentially be faster than a single negative strided load.

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


More information about the llvm-commits mailing list