[llvm] [LV] Vectorize histogram operations (PR #99851)

Florian Hahn via llvm-commits llvm-commits at lists.llvm.org
Tue Sep 17 08:10:03 PDT 2024


================
@@ -1583,6 +1585,50 @@ class VPWidenCallRecipe : public VPSingleDefRecipe {
 #endif
 };
 
+/// A recipe representing a sequence of load -> update -> store as part of
+/// a histogram operation. This means there may be aliasing between vector
+/// lanes, which is handled by the llvm.experimental.vector.histogram family
+/// of intrinsics. The only update operations currently supported are
+/// 'add' and 'sub' where the other term is loop-invariant.
+class VPHistogramRecipe : public VPRecipeBase {
+  unsigned Opcode;
----------------
fhahn wrote:

nit: document that this is the opcode of the increment?

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


More information about the llvm-commits mailing list