We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 9c054f4 commit e439c36Copy full SHA for e439c36
mlir/lib/Dialect/SCF/Transforms/UpliftWhileToFor.cpp
@@ -42,7 +42,7 @@ struct UpliftWhileOp : public OpRewritePattern<scf::WhileOp> {
42
"Loop body must have single cmp op");
43
44
scf::ConditionOp beforeTerm = loop.getConditionOp();
45
- if (!cmp->hasOneUse() && beforeTerm.getCondition() == cmp.getResult())
+ if (!cmp->hasOneUse() || beforeTerm.getCondition() != cmp.getResult())
46
return rewriter.notifyMatchFailure(loop, [&](Diagnostic &diag) {
47
diag << "Expected single condition use: " << *cmp;
48
});
0 commit comments