[llvm] LV: Expand llvm.histogram intrinsic to support umax, umin, and uadd.sat operations (PR #127399)

via llvm-commits llvm-commits at lists.llvm.org
Tue Aug 4 01:20:42 PDT 2026


================
@@ -248,9 +248,13 @@ struct HistogramInfo {
   LoadInst *Load;
   Instruction *Update;
   StoreInst *Store;
+  /// The opcode (for BinaryOperator) or intrinsic ID (for IntrinsicInst) of
+  /// the update operation.
+  unsigned UpdateOpcode;
----------------
RonDahan101 wrote:

Good point. The reason I stored an opcode was that  HistogramUpdateKind  was nested in  VPHistogramRecipe , so legality couldn't name it. I moved the enum to  Analysis/VectorUtils.h  (like  RecurKind ), so  HistogramInfo  now holds the real kind and there's no numeric mixing.

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


More information about the llvm-commits mailing list