Skip to content

Commit 22b96ba

Browse files
use llvm::to_vector return replacements.
1 parent 86c0c0b commit 22b96ba

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2637,7 +2637,7 @@ static SmallVector<OpFoldResult> AffineForEmptyLoopFolder(AffineForOp forOp) {
26372637
// results.
26382638
return forOp.getInits();
26392639
}
2640-
SmallVector<OpFoldResult> replacements;
2640+
SmallVector<OpFoldResult, 4> replacements;
26412641
auto yieldOp = cast<AffineYieldOp>(forOp.getBody()->getTerminator());
26422642
auto iterArgs = forOp.getRegionIterArgs();
26432643
bool hasValDefinedOutsideLoop = false;
@@ -2675,7 +2675,7 @@ static SmallVector<OpFoldResult> AffineForEmptyLoopFolder(AffineForOp forOp) {
26752675
// out of order.
26762676
if (tripCount.has_value() && tripCount.value() >= 2 && iterArgsNotInOrder)
26772677
return {};
2678-
return replacements;
2678+
return llvm::to_vector(replacements);
26792679
}
26802680

26812681
/// Canonicalize the bounds of the given loop.

0 commit comments

Comments
 (0)