summaryrefslogtreecommitdiff
path: root/gcc/loop-doloop.c
diff options
context:
space:
mode:
authorrsandifo <rsandifo@138bc75d-0d04-0410-961f-82ee72b054a4>2013-09-07 09:23:32 +0000
committerrsandifo <rsandifo@138bc75d-0d04-0410-961f-82ee72b054a4>2013-09-07 09:23:32 +0000
commit796b6678b7a5be26e44d64a3b299ac5a8f0877e2 (patch)
tree4e81b82b3b3a04b8f3a48aa7c3dc3d336f8a185c /gcc/loop-doloop.c
parente02d19d4264184dbf4aec0a7f1a31db9a6471ff4 (diff)
downloadgcc-796b6678b7a5be26e44d64a3b299ac5a8f0877e2.tar.gz
Reorganise wide-int classes so that they are all instantiations of a
generic_wide_int class, parameterised by storage. Move all real work outside the main wide_int classes into separate functions. Add a wi:: namespace. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/branches/wide-int@202354 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/loop-doloop.c')
-rw-r--r--gcc/loop-doloop.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/gcc/loop-doloop.c b/gcc/loop-doloop.c
index 17e4cb1c7fa..daeb26cb66f 100644
--- a/gcc/loop-doloop.c
+++ b/gcc/loop-doloop.c
@@ -461,9 +461,9 @@ doloop_modify (struct loop *loop, struct niter_desc *desc,
/* Determine if the iteration counter will be non-negative.
Note that the maximum value loaded is iterations_max - 1. */
if (max_loop_iterations (loop, &iterations)
- && (iterations.leu_p (wide_int::set_bit_in_zero
- (GET_MODE_PRECISION (mode) - 1,
- GET_MODE_PRECISION (mode)))))
+ && wi::leu_p (iterations,
+ wi::set_bit_in_zero (GET_MODE_PRECISION (mode) - 1,
+ GET_MODE_PRECISION (mode))))
nonneg = 1;
break;
@@ -553,7 +553,7 @@ doloop_modify (struct loop *loop, struct niter_desc *desc,
rtx iter_rtx;
if (!max_loop_iterations (loop, &iter)
- || !iter.fits_shwi_p ())
+ || !wi::fits_shwi_p (iter))
iter_rtx = const0_rtx;
else
iter_rtx = GEN_INT (iter.to_shwi ());
@@ -671,7 +671,7 @@ doloop_optimize (struct loop *loop)
count = copy_rtx (desc->niter_expr);
iterations = desc->const_iter ? desc->niter_expr : const0_rtx;
if (!max_loop_iterations (loop, &iter)
- || !iter.fits_shwi_p ())
+ || !wi::fits_shwi_p (iter))
iterations_max = const0_rtx;
else
iterations_max = GEN_INT (iter.to_shwi ());
@@ -697,7 +697,7 @@ doloop_optimize (struct loop *loop)
computed, we must be sure that the number of iterations fits into
the new mode. */
&& (word_mode_size >= GET_MODE_PRECISION (mode)
- || iter.leu_p (word_mode_max)))
+ || wi::leu_p (iter, word_mode_max)))
{
if (word_mode_size > GET_MODE_PRECISION (mode))
{