diff options
Diffstat (limited to 'mlir/lib')
| -rw-r--r-- | mlir/lib/Transforms/LoopTiling.cpp | 2 | 
1 files changed, 1 insertions, 1 deletions
diff --git a/mlir/lib/Transforms/LoopTiling.cpp b/mlir/lib/Transforms/LoopTiling.cpp index 64d1839fd66..11f2468b1a9 100644 --- a/mlir/lib/Transforms/LoopTiling.cpp +++ b/mlir/lib/Transforms/LoopTiling.cpp @@ -293,7 +293,7 @@ static void adjustToDivisorsOfTripCounts(ArrayRef<AffineForOp> band,      // Adjust the tile size to largest factor of the trip count less than      // tSize.      uint64_t constTripCount = mayConst.getValue(); -    if (tSizeAdjusted > constTripCount / 2) +    if (constTripCount > 1 && tSizeAdjusted > constTripCount / 2)        tSizeAdjusted = constTripCount / 2;      while (constTripCount % tSizeAdjusted != 0)        tSizeAdjusted--;  | 

