From b3fc08a2314838bf657532791aa53091890d5c23 Mon Sep 17 00:00:00 2001 From: max Date: Wed, 15 Jan 2025 23:16:32 -0500 Subject: [PATCH] [mlir] fix dialect conversion with no type converter --- mlir/lib/Transforms/Utils/DialectConversion.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/mlir/lib/Transforms/Utils/DialectConversion.cpp b/mlir/lib/Transforms/Utils/DialectConversion.cpp index 403321d40d53c..30b346760e792 100644 --- a/mlir/lib/Transforms/Utils/DialectConversion.cpp +++ b/mlir/lib/Transforms/Utils/DialectConversion.cpp @@ -209,8 +209,11 @@ ConversionValueMapping::lookupOrDefault(Value from, } } if (next != current) { - // If at least one value was replaced, continue the lookup from there. current = std::move(next); + // Special case 1; return the most recently mapped values. + if (desiredTypes.empty()) + break; + // If at least one value was replaced, continue the lookup from there. continue; }