Skip to content

Commit 8350c93

Browse files
committed
address comment
Signed-off-by: Max Dawkins <[email protected]>
1 parent 43ece6b commit 8350c93

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

mlir/lib/Dialect/SCF/IR/SCF.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1775,7 +1775,7 @@ struct ForallOpReplaceConstantInductionVar : public OpRewritePattern<ForallOp> {
17751775
// Replace all induction vars with a single trip count with their lower
17761776
// bound.
17771777
Location loc = op.getLoc();
1778-
bool replacedIv = false;
1778+
bool changed = false;
17791779
for (auto [lb, ub, step, iv] :
17801780
llvm::zip(op.getMixedLowerBound(), op.getMixedUpperBound(),
17811781
op.getMixedStep(), op.getInductionVars())) {
@@ -1787,9 +1787,9 @@ struct ForallOpReplaceConstantInductionVar : public OpRewritePattern<ForallOp> {
17871787
}
17881788
rewriter.replaceAllUsesWith(
17891789
iv, getValueOrCreateConstantIndexOp(rewriter, loc, lb));
1790-
return success();
1790+
changed = true;
17911791
}
1792-
return failure();
1792+
return success(changed);
17931793
}
17941794
};
17951795

0 commit comments

Comments
 (0)