aboutsummaryrefslogtreecommitdiff
path: root/gcc/tree-ssa-loop-prefetch.c
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/tree-ssa-loop-prefetch.c')
-rw-r--r--gcc/tree-ssa-loop-prefetch.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/gcc/tree-ssa-loop-prefetch.c b/gcc/tree-ssa-loop-prefetch.c
index 0a2ee5e..ead2543 100644
--- a/gcc/tree-ssa-loop-prefetch.c
+++ b/gcc/tree-ssa-loop-prefetch.c
@@ -700,9 +700,9 @@ ddown (HOST_WIDE_INT x, unsigned HOST_WIDE_INT by)
gcc_assert (by > 0);
if (x >= 0)
- return x / by;
+ return x / (HOST_WIDE_INT) by;
else
- return (x + by - 1) / by;
+ return (x + (HOST_WIDE_INT) by - 1) / (HOST_WIDE_INT) by;
}
/* Given a CACHE_LINE_SIZE and two inductive memory references