[Mlir-commits] [mlir] [mlir][x86] Decouple Accumulator from ADD-Based Vector Contractions (over loops) (PR #204327)
Arun Thangamani
llvmlistbot at llvm.org
Wed Jul 29 06:41:04 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;
----------------
arun-thmn wrote:
The function serves for two purpose:
1. Checks for one user,
2. It is not an `scf.yield`.
Even if the return `v` is same value back, it does the check `1`.
https://github.com/llvm/llvm-project/pull/204327
More information about the Mlir-commits
mailing list