[llvm] [LV] Autovectorization for the all-in-one histogram intrinsic (PR #91458)

Florian Hahn via llvm-commits llvm-commits at lists.llvm.org
Thu Jul 11 08:03:06 PDT 2024


================
@@ -1517,6 +1518,35 @@ class VPWidenCallRecipe : public VPSingleDefRecipe {
 #endif
 };
 
+class VPHistogramRecipe : public VPRecipeBase {
+  unsigned Opcode;
+
+public:
+  template <typename IterT>
+  VPHistogramRecipe(unsigned Opcode, iterator_range<IterT> Operands,
+                    DebugLoc DL = {})
+      : VPRecipeBase(VPDef::VPHistogramSC, Operands, DL), Opcode(Opcode) {}
+
+  ~VPHistogramRecipe() override = default;
+
+  VPHistogramRecipe *clone() override {
+    llvm_unreachable("cloning not supported");
----------------
fhahn wrote:

Can histograms never occur in epilog vectorized loops?

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


More information about the llvm-commits mailing list