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

Julian Oppermann llvmlistbot at llvm.org
Thu Jul 23 02:01:53 PDT 2026


================
@@ -155,9 +174,21 @@ Operation *traceToVectorReadLikeParentOperation(Value v) {
   while (true) {
     // Case 1: Value defined by an operation
     if (Operation *defOp = v.getDefiningOp()) {
-      if (isa<vector::TransferReadOp, vector::LoadOp>(defOp))
+      if (isa<vector::TransferReadOp, vector::LoadOp, arith::ConstantOp>(defOp))
         return defOp;
 
+      if (isa<arith::ConstantOp>(defOp)) {
+        Attribute value = (dyn_cast<arith::ConstantOp>(defOp)).getValue();
----------------
jopperm wrote:

Nit: Use the `dyn_cast` already in the if-condition.

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


More information about the Mlir-commits mailing list