force_to_mode cleanup
Jan Hubicka
jh@suse.cz
Fri Jul 28 15:07:00 GMT 2000
Hi
The force_to_mode masks the mask with GET_MODE_MASK (mode), so we can pass full
mask at place GET_MODE_MASK (mode) is passed currently. This avoids some
expense especially with checking code on.
Fri Jul 28 21:48:15 CEST 2000 Jan Hubicka <jh@suse.cz>
* combine.c (simplify_set, make_extraction, make_compound_operation
make_field_assignment): Use full mask instead of GET_MODE_MASK (mode)
as force_to_mode argument.
*** combine.c.mode Fri Jul 28 14:52:03 2000
--- combine.c Fri Jul 28 21:37:05 2000
*************** simplify_set (x)
*** 4878,4884 ****
if (GET_MODE_CLASS (mode) == MODE_INT)
{
! src = force_to_mode (src, mode, GET_MODE_MASK (mode), NULL_RTX, 0);
SUBST (SET_SRC (x), src);
}
--- 4884,4890 ----
if (GET_MODE_CLASS (mode) == MODE_INT)
{
! src = force_to_mode (src, mode, ~(HOST_WIDE_INT) 0, NULL_RTX, 0);
SUBST (SET_SRC (x), src);
}
*************** make_extraction (mode, inner, pos, pos_r
*** 5972,5978 ****
else
new = force_to_mode (inner, tmode,
len >= HOST_BITS_PER_WIDE_INT
! ? GET_MODE_MASK (tmode)
: ((unsigned HOST_WIDE_INT) 1 << len) - 1,
NULL_RTX, 0);
--- 5978,5984 ----
else
new = force_to_mode (inner, tmode,
len >= HOST_BITS_PER_WIDE_INT
! ? ~(HOST_WIDE_INT) 0
: ((unsigned HOST_WIDE_INT) 1 << len) - 1,
NULL_RTX, 0);
*************** make_extraction (mode, inner, pos, pos_r
*** 6193,6199 ****
inner = force_to_mode (inner, wanted_inner_mode,
pos_rtx
|| len + orig_pos >= HOST_BITS_PER_WIDE_INT
! ? GET_MODE_MASK (wanted_inner_mode)
: ((((unsigned HOST_WIDE_INT) 1 << len) - 1)
<< orig_pos),
NULL_RTX, 0);
--- 6199,6205 ----
inner = force_to_mode (inner, wanted_inner_mode,
pos_rtx
|| len + orig_pos >= HOST_BITS_PER_WIDE_INT
! ? ~(HOST_WIDE_INT) 0
: ((((unsigned HOST_WIDE_INT) 1 << len) - 1)
<< orig_pos),
NULL_RTX, 0);
*************** make_compound_operation (x, in_code)
*** 6523,6530 ****
&& GET_MODE_SIZE (mode) < GET_MODE_SIZE (GET_MODE (tem))
&& subreg_lowpart_p (x))
{
! rtx newer = force_to_mode (tem, mode,
! GET_MODE_MASK (mode), NULL_RTX, 0);
/* If we have something other than a SUBREG, we might have
done an expansion, so rerun outselves. */
--- 6534,6541 ----
&& GET_MODE_SIZE (mode) < GET_MODE_SIZE (GET_MODE (tem))
&& subreg_lowpart_p (x))
{
! rtx newer = force_to_mode (tem, mode, ~(HOST_WIDE_INT) 0,
! NULL_RTX, 0);
/* If we have something other than a SUBREG, we might have
done an expansion, so rerun outselves. */
*************** make_field_assignment (x)
*** 7639,7645 ****
GET_MODE (src), other, pos),
mode,
GET_MODE_BITSIZE (mode) >= HOST_BITS_PER_WIDE_INT
! ? GET_MODE_MASK (mode)
: ((unsigned HOST_WIDE_INT) 1 << len) - 1,
dest, 0);
--- 7665,7671 ----
GET_MODE (src), other, pos),
mode,
GET_MODE_BITSIZE (mode) >= HOST_BITS_PER_WIDE_INT
! ? ~(HOST_WIDE_INT) 0
: ((unsigned HOST_WIDE_INT) 1 << len) - 1,
dest, 0);
More information about the Gcc-patches
mailing list