Skip to content

Commit 07393f3

Browse files
Update mlir/lib/Dialect/Affine/IR/AffineOps.cpp
Co-authored-by: Jakub Kuderski <[email protected]>
1 parent 5396152 commit 07393f3

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

mlir/lib/Dialect/Affine/IR/AffineOps.cpp

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2646,8 +2646,7 @@ static SmallVector<OpFoldResult> AffineForEmptyLoopFolder(AffineForOp forOp) {
26462646
// TODO: It should be possible to perform a replacement by computing the
26472647
// last value of the IV based on the bounds and the step.
26482648
if (val == forOp.getInductionVar()) {
2649-
OpFoldResult lastTripIv = getConstantInductionVarForLastTrip(forOp);
2650-
if (lastTripIv) {
2649+
if (OpFoldResult lastTripIv = getConstantInductionVarForLastTrip(forOp)) {
26512650
replacements.push_back(lastTripIv);
26522651
continue;
26532652
} else {

0 commit comments

Comments
 (0)