[Mlir-commits] [mlir] [mlir][vector] support unrolling vector.contract with scalar result (PR #232203)

Federico Bruzzone llvmlistbot at llvm.org
Mon Oct 19 00:26:50 PDT 2026


================
@@ -290,10 +289,11 @@ struct UnrollContractionPattern
 
   LogicalResult matchAndRewrite(vector::ContractionOp contractOp,
                                 PatternRewriter &rewriter) const override {
+    bool scalarResult = !isa<VectorType>(contractOp.getResultType());
----------------
FedericoBruzzone wrote:

`contractOp.getResultType()` is called 3 times. Can we call it once at the entry of `matchAndRewrite`?

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


More information about the Mlir-commits mailing list