combine.c (simplify_and_const_int): Use gen_int_mode instead of GEN_INT (trunc_int_for_mode (...)).

* combine.c (simplify_and_const_int): Use gen_int_mode instead
	of GEN_INT (trunc_int_for_mode (...)).
	* loop-iv.c (iv_number_of_iterations): Likewise.
	* postreload.c (reload_cse_move2add): Likewise.
	* simplify-rtx.c (simplify_const_unary_operation,
	simplify_const_binary_operation): Likewise.
	* stor-layout.c (get_mode_bounds): Likewise.

From-SVN: r95935
This commit is contained in:
Kazu Hirata 2005-03-05 17:25:33 +00:00 committed by Kazu Hirata
parent 60b92d7028
commit bb80db7b6d
6 changed files with 22 additions and 21 deletions

View File

@ -21,6 +21,14 @@
* tree-ssa-pre.c (remove_dead_inserted_code): Likewise.
* tree-ssa.c (kill_redundant_phi_nodes): Likewise.
* combine.c (simplify_and_const_int): Use gen_int_mode instead
of GEN_INT (trunc_int_for_mode (...)).
* loop-iv.c (iv_number_of_iterations): Likewise.
* postreload.c (reload_cse_move2add): Likewise.
* simplify-rtx.c (simplify_const_unary_operation,
simplify_const_binary_operation): Likewise.
* stor-layout.c (get_mode_bounds): Likewise.
2005-03-05 Richard Sandiford <rsandifo@redhat.com>
* doc/invoke.texi: Document new MIPS -msym32 and -mno-sym32 options.

View File

@ -8095,7 +8095,7 @@ simplify_and_const_int (rtx x, enum machine_mode mode, rtx varop,
/* If VAROP is a CONST_INT, then we need to apply the mask in CONSTOP
to VAROP and return the new constant. */
if (GET_CODE (varop) == CONST_INT)
return GEN_INT (trunc_int_for_mode (INTVAL (varop) & constop, mode));
return gen_int_mode (INTVAL (varop) & constop, mode);
/* See what bits may be nonzero in VAROP. Unlike the general case of
a call to nonzero_bits, here we don't care about bits outside

View File

@ -2369,8 +2369,7 @@ iv_number_of_iterations (struct loop *loop, rtx insn, rtx condition,
tmp = simplify_gen_binary (UDIV, mode, tmp1, GEN_INT (d));
inv = inverse (s, size);
inv = trunc_int_for_mode (inv, mode);
tmp = simplify_gen_binary (MULT, mode, tmp, GEN_INT (inv));
tmp = simplify_gen_binary (MULT, mode, tmp, gen_int_mode (inv, mode));
desc->niter_expr = simplify_gen_binary (AND, mode, tmp, bound);
}
else

View File

@ -1244,10 +1244,8 @@ reload_cse_move2add (rtx first)
if (GET_CODE (src) == CONST_INT && reg_base_reg[regno] < 0)
{
rtx new_src =
GEN_INT (trunc_int_for_mode (INTVAL (src)
- reg_offset[regno],
GET_MODE (reg)));
rtx new_src = gen_int_mode (INTVAL (src) - reg_offset[regno],
GET_MODE (reg));
/* (set (reg) (plus (reg) (const_int 0))) is not canonical;
use (set (reg) (reg)) instead.
We don't delete this insn, nor do we convert it into a
@ -1284,9 +1282,8 @@ reload_cse_move2add (rtx first)
{
rtx narrow_reg = gen_rtx_REG (narrow_mode,
REGNO (reg));
rtx narrow_src =
GEN_INT (trunc_int_for_mode (INTVAL (src),
narrow_mode));
rtx narrow_src = gen_int_mode (INTVAL (src),
narrow_mode);
rtx new_set =
gen_rtx_SET (VOIDmode,
gen_rtx_STRICT_LOW_PART (VOIDmode,
@ -1335,10 +1332,10 @@ reload_cse_move2add (rtx first)
HOST_WIDE_INT base_offset = reg_offset[REGNO (src)];
HOST_WIDE_INT regno_offset = reg_offset[regno];
rtx new_src =
GEN_INT (trunc_int_for_mode (added_offset
+ base_offset
- regno_offset,
GET_MODE (reg)));
gen_int_mode (added_offset
+ base_offset
- regno_offset,
GET_MODE (reg));
int success = 0;
if (new_src == const0_rtx)

View File

@ -829,9 +829,7 @@ simplify_const_unary_operation (enum rtx_code code, enum machine_mode mode,
gcc_unreachable ();
}
val = trunc_int_for_mode (val, mode);
return GEN_INT (val);
return gen_int_mode (val, mode);
}
/* We can do some operations on integer CONST_DOUBLEs. Also allow
@ -2491,8 +2489,7 @@ simplify_const_binary_operation (enum rtx_code code, enum machine_mode mode,
gcc_unreachable ();
}
val = trunc_int_for_mode (val, mode);
return GEN_INT (val);
return gen_int_mode (val, mode);
}
return NULL_RTX;

View File

@ -2097,8 +2097,8 @@ get_mode_bounds (enum machine_mode mode, int sign,
max_val = ((unsigned HOST_WIDE_INT) 1 << (size - 1) << 1) - 1;
}
*mmin = GEN_INT (trunc_int_for_mode (min_val, target_mode));
*mmax = GEN_INT (trunc_int_for_mode (max_val, target_mode));
*mmin = gen_int_mode (min_val, target_mode);
*mmax = gen_int_mode (max_val, target_mode);
}
#include "gt-stor-layout.h"