diff --git a/mlir/lib/Transforms/Utils/LoopUtils.cpp b/mlir/lib/Transforms/Utils/LoopUtils.cpp --- a/mlir/lib/Transforms/Utils/LoopUtils.cpp +++ b/mlir/lib/Transforms/Utils/LoopUtils.cpp @@ -221,6 +221,7 @@ void mlir::promoteSingleIterationLoops(FuncOp f) { // Gathers all innermost loops through a post order pruned walk. f.walk([](AffineForOp forOp) { promoteIfSingleIteration(forOp); }); + f.walk([](scf::ForOp forOp) { promoteIfSingleIteration(forOp); }); } /// Generates an affine.for op with the specified lower and upper bounds