[Mlir-commits] [mlir] [mlir][Transforms] Dialect conversion: Fix bug in `UnresolvedMaterializationRewrite` rollback (PR #105949)

Matthias Springer llvmlistbot at llvm.org
Thu Nov 28 18:11:46 PST 2024


================
@@ -1342,23 +1349,28 @@ Block *ConversionPatternRewriterImpl::applySignatureConversion(
 /// of input operands.
 Value ConversionPatternRewriterImpl::buildUnresolvedMaterialization(
     MaterializationKind kind, OpBuilder::InsertPoint ip, Location loc,
-    ValueRange inputs, Type outputType, Type originalType,
+    Value valueToMap, ValueRange inputs, Type outputType, Type originalType,
----------------
matthias-springer wrote:

Not in the general case. E.g., we have this in `remapValues` and `origType` and `newOperand.getType()` are different here.
```
      Value castValue = buildUnresolvedMaterialization(
          MaterializationKind::Target, computeInsertPoint(newOperand),
          operandLoc, /*valueToMap=*/newOperand, /*inputs=*/newOperand,
          /*outputType=*/desiredType, /*originalType=*/origType,
          currentTypeConverter);
```


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


More information about the Mlir-commits mailing list