[Mlir-commits] [mlir] [mlir][Transforms] Add 1:N `matchAndRewrite` overload (PR #116470)

Ingo Müller llvmlistbot at llvm.org
Thu Nov 21 04:44:24 PST 2024


================
@@ -37,7 +37,8 @@ struct CallOpSignatureConversion : public OpConversionPattern<CallOp> {
     // Substitute with the new result types from the corresponding FuncType
     // conversion.
     rewriter.replaceOpWithNewOp<CallOp>(
-        callOp, callOp.getCallee(), convertedResults, adaptor.getOperands());
+        callOp, callOp.getCallee(), convertedResults,
+        getOneToOneAdaptorOperands(adaptor.getOperands()));
----------------
ingomueller-net wrote:

Aha, I see, thanks. The diff view in Github had hidden that check... Another question though: is the test really enough? Can't we have a conversion `a -> (c, d)` of one operand and `b -> ()` for another, such that the operands `a, b` get converted to `c, d`, which passes that test but then makes `getOneToOneAdaptorOperands` fail? (Since we want to ensure that there are really only 1:1 conversions, using that function is actually a good idea, I think.)

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


More information about the Mlir-commits mailing list