================ @@ -2459,10 +2457,42 @@ OperationConverter::finalize(ConversionPatternRewriter &rewriter) { return failure(); DenseMap<Value, SmallVector<Value>> inverseMapping = rewriterImpl.mapping.getInverse(); + if (failed(legalizeConvertedOpResultTypes(rewriter, rewriterImpl, + inverseMapping))) + return failure(); if (failed(legalizeUnresolvedMaterializations(rewriter, rewriterImpl, inverseMapping))) return failure(); + return success(); +} +/// Finds a user of the given value, or of any other value that the given value +/// replaced, that was not replaced in the conversion process. +static Operation *findLiveUserOfReplaced( + Value initialValue, ConversionPatternRewriterImpl &rewriterImpl, + const DenseMap<Value, SmallVector<Value>> &inverseMapping) { + SmallVector<Value> worklist(1, initialValue); ---------------- kuhar wrote:
nit ```suggestion SmallVector<Value> worklist = {initialValue}; ``` https://github.com/llvm/llvm-project/pull/101514 _______________________________________________ llvm-branch-commits mailing list llvm-branch-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits