Skip to content

Commit faa30be

Browse files
[mlir][Transforms] Fix build after #116524 (#121578)
Fix build errors after #116524. ``` error: call of overloaded ‘TypeRange(ValueVector&)’ is ambiguous ```
1 parent adeff9f commit faa30be

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

mlir/lib/Transforms/Utils/DialectConversion.cpp

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -227,7 +227,7 @@ ConversionValueMapping::lookupOrDefault(Value from,
227227
ValueVector current{from};
228228
do {
229229
// Store the current value if the types match.
230-
if (TypeRange(current) == desiredTypes)
230+
if (TypeRange(ValueRange(current)) == desiredTypes)
231231
desiredValue = current;
232232

233233
// If possible, Replace each value with (one or multiple) mapped values.
@@ -271,9 +271,8 @@ ConversionValueMapping::lookupOrDefault(Value from,
271271
ValueVector ConversionValueMapping::lookupOrNull(Value from,
272272
TypeRange desiredTypes) const {
273273
ValueVector result = lookupOrDefault(from, desiredTypes);
274-
TypeRange resultTypes(result);
275274
if (result == ValueVector{from} ||
276-
(!desiredTypes.empty() && resultTypes != desiredTypes))
275+
(!desiredTypes.empty() && TypeRange(ValueRange(result)) != desiredTypes))
277276
return {};
278277
return result;
279278
}
@@ -1291,7 +1290,7 @@ LogicalResult ConversionPatternRewriterImpl::remapValues(
12911290
}
12921291

12931292
ValueVector repl = mapping.lookupOrDefault(operand, legalTypes);
1294-
if (!repl.empty() && TypeRange(repl) == legalTypes) {
1293+
if (!repl.empty() && TypeRange(ValueRange(repl)) == legalTypes) {
12951294
// Mapped values have the correct type or there is an existing
12961295
// materialization. Or the operand is not mapped at all and has the
12971296
// correct type.

0 commit comments

Comments
 (0)