[Mlir-commits] [mlir] [mlir][x86] Add extra patterns for AMX nano-kernel lowering (acc with zero constant) (PR #222513)

Arun Thangamani llvmlistbot at llvm.org
Fri Sep 11 00:03:01 PDT 2026


================
@@ -1124,6 +1154,16 @@ struct VectorContractToAMXDotProduct
               "the re-write conditions either the dimensions are "
               "wrong or MemRef source are different or many users.");
 
+        Operation *contractReadOp =
+            traceToVectorReadLikeParentOperation(contract.getAcc());
+
+        if ((isAccZeroVectorConstant &&
+             !isZeroVectorConstant(contractReadOp)) ||
+            (!isAccZeroVectorConstant && isZeroVectorConstant(contractReadOp)))
----------------
arun-thmn wrote:

True, sems like yes.

Updated the code with this simplified condition.

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


More information about the Mlir-commits mailing list