[llvm] Expanding the Histogram Intrinsic (PR #127399)

via llvm-commits llvm-commits at lists.llvm.org
Sun Feb 23 00:14:09 PST 2025


================
@@ -1072,34 +1072,41 @@ bool LoopVectorizationLegality::canVectorizeInstrs() {
 
 /// Find histogram operations that match high-level code in loops:
 /// \code
-/// buckets[indices[i]]+=step;
+/// buckets[indices[i]] = UpdateOperator(buckets[indices[i]], Val);
 /// \endcode
+/// When updateOperator can be add, sub, add.sat, umin, umax.
 ///
 /// It matches a pattern starting from \p HSt, which Stores to the 'buckets'
-/// array the computed histogram. It uses a BinOp to sum all counts, storing
-/// them using a loop-variant index Load from the 'indices' input array.
+/// array the computed histogram. It uses a update instruction to update all
----------------
RonDahan101 wrote:

Done

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


More information about the llvm-commits mailing list