[llvm-branch-commits] [llvm] [LoopVectorize] Support vectorization of compressing patterns in VPlan (PR #140723)

Sergey Kachkov via llvm-branch-commits llvm-branch-commits at lists.llvm.org
Fri Nov 7 05:55:56 PST 2025


================
@@ -3193,6 +3239,9 @@ class LLVM_ABI_FOR_TEST VPWidenMemoryRecipe : public VPRecipeBase,
   /// Whether the consecutive accessed addresses are in reverse order.
   bool Reverse;
 
+  /// Whether the consecutive accessed addresses are compressed with mask value.
+  bool Compressed;
+
----------------
skachkov-sc wrote:

There is no intrinsic before loop vectorization here; we have plain load/store instruction that is placed under some predicate in the original loop, so it become masked in LoopVectorizer. The difference with ordinary masked loads/stores is that "compressed" loads/stores read or write the memory consecutively (the number of elements == the number of set mask bits), and then broadcast the elements in the masked positions

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


More information about the llvm-branch-commits mailing list