[Mlir-commits] [mlir] [mlir][x86] Extends vector.contract Flat dot-product lowering for arg offset (PR #185167)

Adam Siemieniuk llvmlistbot at llvm.org
Sun Mar 8 11:45:15 PDT 2026


================
@@ -67,7 +67,15 @@ static void packNonUnitDimOperandToVNNI(mlir::PatternRewriter &rewriter,
                                         mlir::vector::ContractionOp contractB,
                                         int64_t nonUnitDimAcc,
                                         mlir::VectorType Ty) {
-  mlir::Operation *insertAfter = opA->isBeforeInBlock(opB) ? opB : opA;
+
+  bool opABeforeopB = opA->isBeforeInBlock(opB);
+
+  if (opABeforeopB)
+    opB->moveAfter(opA);
+  else
+    opA->moveAfter(opB);
----------------
adam-smnk wrote:

nit: use rewriter API: `rewriter.moveOpAfter`

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


More information about the Mlir-commits mailing list