diff --git a/mlir/lib/Transforms/Utils/DialectConversion.cpp b/mlir/lib/Transforms/Utils/DialectConversion.cpp --- a/mlir/lib/Transforms/Utils/DialectConversion.cpp +++ b/mlir/lib/Transforms/Utils/DialectConversion.cpp @@ -1485,6 +1485,7 @@ auto &rootUpdates = impl->rootUpdates; auto it = llvm::find_if(llvm::reverse(rootUpdates), stateHasOp); assert(it != rootUpdates.rend() && "no root update started on op"); + (*it).resetOperation(); int updateIdx = std::prev(rootUpdates.rend()) - it; rootUpdates.erase(rootUpdates.begin() + updateIdx); }