projects
/
platform
/
upstream
/
llvm.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
1e217cc
)
Fix bug in LoopTiling where a loop with trip count of 1 caused a division by...
author
MLIR Team
<no-reply@google.com>
Fri, 3 May 2019 10:08:56 +0000
(
03:08
-0700)
committer
Mehdi Amini
<joker.eph@gmail.com>
Mon, 6 May 2019 15:26:15 +0000
(08:26 -0700)
--
PiperOrigin-RevId:
246480710
mlir/lib/Transforms/LoopTiling.cpp
patch
|
blob
|
history
diff --git
a/mlir/lib/Transforms/LoopTiling.cpp
b/mlir/lib/Transforms/LoopTiling.cpp
index
64d1839
..
11f2468
100644
(file)
--- 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--;