This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [Committed] ifcvt.c solution to PR9814
On Sat, May 28, 2005 at 12:03:11PM -0600, Roger Sayle wrote:
> * ifcvt.c (noce_emit_move_insn): Construct a SET pattern directly
> instead of calling emit_move_insn with an arbitrary RHS.
Hmm. How about this rearrangement:
if (GET_CODE (x) == STRICT_LOW_PART)
{
enum machine_mode outmode;
rtx outer, inner;
int bitpos;
outer = XEXP (x, 0);
inner = XEXP (outer, 0);
outmode = GET_MODE (outer);
bitpos = SUBREG_BYTE (outer) * BITS_PER_UNIT;
store_bit_field (inner, GET_MODE_BITSIZE (outmode), bitpos, outmode, y);
}
else if (OBJECT_P (y) || CONSTANT_P (y) || GET_CODE (y) == SUBREG)
emit_move_insn (x, y)
else
{
emit_insn (gen_rtx_SET (VOIDmode, x, y));
...
}
I'm thinking of the situation in which we have a rhs constant that's
too large for a direct set, but for which the mov<mode> pattern would
have expanded to a pair of sets.
Also, you have a typo SET_DEST for SET_SRC.
r~