Skip to content

Commit d2b7a8e

Browse files
committed
[mlir] Partial revert of 93c4229
This part of the change was not NFC.
1 parent ff44c25 commit d2b7a8e

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

mlir/lib/Dialect/SCF/Transforms/TileUsingInterface.cpp

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -101,9 +101,10 @@ static bool tileDividesIterationDomain(Range loopRange) {
101101
/// `tileSize`, i.e., `min(tileSize, range.end() - iv)`.
102102
static OpFoldResult getBoundedTileSize(OpBuilder &b, Location loc,
103103
Range loopRange, Value iv,
104-
OpFoldResult tileSize) {
105-
if (isConstantIntValue(tileSize, 1))
106-
return tileSize;
104+
Value tileSize) {
105+
std::optional<int64_t> ts = getConstantIntValue(tileSize);
106+
if (ts && ts.value() == 1)
107+
return getAsOpFoldResult(tileSize);
107108

108109
if (tileDividesIterationDomain(
109110
Range{loopRange.offset, loopRange.size, tileSize}))

0 commit comments

Comments
 (0)