diff --git a/mlir/lib/Transforms/Utils/GreedyPatternRewriteDriver.cpp b/mlir/lib/Transforms/Utils/GreedyPatternRewriteDriver.cpp --- a/mlir/lib/Transforms/Utils/GreedyPatternRewriteDriver.cpp +++ b/mlir/lib/Transforms/Utils/GreedyPatternRewriteDriver.cpp @@ -181,8 +181,8 @@ // Add all the users of the result to the worklist so we make sure // to revisit them. for (auto result : op->getResults()) - for (auto *operand : result.getUsers()) - addToWorklist(operand); + for (auto *userOp : result.getUsers()) + addToWorklist(userOp); notifyOperationRemoved(op); };