[PATCH] Fixes some of PR 18463 and 17647, i386 address mode not being generated
Richard Henderson
rth@redhat.com
Thu Nov 25 20:50:00 GMT 2004
On Thu, Nov 25, 2004 at 03:26:59PM -0500, Andrew Pinski wrote:
> + case ASHIFT:
> + if (GET_CODE (XEXP (x, 1)) == CONST_INT
> + && INTVAL (XEXP (x, 1)) < HOST_BITS_PER_WIDE_INT
> + && INTVAL (XEXP (x, 1)) >= 0)
> + {
> + new = canon_for_address (XEXP (x, 0));
> + new = gen_rtx_MULT (mode, new,
> + GEN_INT ((HOST_WIDE_INT) 1
> + << INTVAL (XEXP (x, 1))));
I think you shouldn't transform this if INTVAL is larger than
the mode. You may say "but that would be illegal", except that
shift_truncation_mask is what actually applies after the
backend has had its hand in. And do use gen_int_mode.
Otherwise ok.
r~
More information about the Gcc-patches
mailing list