[Mlir-commits] [mlir] [mlir][Transforms] Dialect conversion: Fix missing source materialization (PR #97903)
Johannes Reifferscheid
llvmlistbot at llvm.org
Sun Jul 7 22:58:31 PDT 2024
================
@@ -2865,6 +2860,8 @@ static LogicalResult legalizeUnresolvedMaterialization(
break;
}
if (newMaterialization) {
+ assert(newMaterialization.getType() == opResult.getType() &&
+ "materialization callback produced value of incorrect type");
----------------
jreiffers wrote:
Another alternative would be to insert the cast here, if the types don't match. That'll probably be easier to debug in the IR when it goes wrong, but not sure if it fits in the design of the API.
https://github.com/llvm/llvm-project/pull/97903
More information about the Mlir-commits
mailing list