[Mlir-commits] [mlir] [mlir][Transforms] Dialect conversion: add missing argument materialization. (PR #121200)

Matthias Springer llvmlistbot at llvm.org
Fri Dec 27 02:50:25 PST 2024


================
@@ -1375,12 +1375,18 @@ Block *ConversionPatternRewriterImpl::applySignatureConversion(
     // used as a replacement.
     auto replArgs =
         newBlock->getArguments().slice(inputMap->inputNo, inputMap->size);
+    auto insertPoint = OpBuilder::InsertPoint(newBlock, newBlock->begin());
     if (replArgs.size() == 1) {
-      mapping.map(origArg, replArgs.front());
+      // We need an argument materialization to replace the block argument.
+      Value argMat = buildUnresolvedMaterialization(
----------------
matthias-springer wrote:

This should not be necessary. Argument materialization are a workaround around missing 1:N support, but this is a 1:1 replacement.

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


More information about the Mlir-commits mailing list