[Mlir-commits] [mlir] [mlir][x86] Decouple Accumulator from ADD-Based Vector Contractions (over loops) (PR #204327)

Adam Siemieniuk llvmlistbot at llvm.org
Tue Jul 28 02:33:03 PDT 2026


================
@@ -144,6 +144,25 @@ inline ShuffleMasks getShuffleMasks(int64_t nonUnitDimAcc, bool isInt8Avx2) {
   return {maskLo8, maskHi8};
 }
 
+// Recursively follows single-use values through scf.yield operations
+// and returns the first non-yield user result in the contraction chain.
+Value contractionUsersAfterYield(Value v) {
+  if (v.getNumUses() != 1)
+    return nullptr;
+
+  OpOperand &use = *v.use_begin();
+  Operation *user = use.getOwner();
+
+  if (!isa<scf::YieldOp>(user))
+    return v;
----------------
adam-smnk wrote:

What if `v` is not `null`? Returning itself it still not a "user", still no idea how I should view that value.

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


More information about the Mlir-commits mailing list