Skip to content

Commit a289930

Browse files
committed
Update the comments.
1 parent 9f6043e commit a289930

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

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

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3582,8 +3582,9 @@ struct WhileMoveIfDown : public OpRewritePattern<WhileOp> {
35823582

35833583
LogicalResult matchAndRewrite(WhileOp op,
35843584
PatternRewriter &rewriter) const override {
3585-
// Check that the first operation in the before region is an scf.if whose
3586-
// condition matches the condition of the scf.condition op.
3585+
// Check that the first opeation produces one result and that result must
3586+
// have exactly two uses (these two uses come from the `scf.if` and
3587+
// `scf.condition` operations).
35873588
Operation &condOp = op.getBeforeBody()->front();
35883589
if (condOp.getNumResults() != 1 || !condOp.getResult(0).hasNUses(2))
35893590
return failure();

0 commit comments

Comments
 (0)