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 5396152 commit 07393f3Copy full SHA for 07393f3
mlir/lib/Dialect/Affine/IR/AffineOps.cpp
@@ -2646,8 +2646,7 @@ static SmallVector<OpFoldResult> AffineForEmptyLoopFolder(AffineForOp forOp) {
2646
// TODO: It should be possible to perform a replacement by computing the
2647
// last value of the IV based on the bounds and the step.
2648
if (val == forOp.getInductionVar()) {
2649
- OpFoldResult lastTripIv = getConstantInductionVarForLastTrip(forOp);
2650
- if (lastTripIv) {
+ if (OpFoldResult lastTripIv = getConstantInductionVarForLastTrip(forOp)) {
2651
replacements.push_back(lastTripIv);
2652
continue;
2653
} else {
0 commit comments