This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH] Fixes some of PR 18463 and 17647, i386 address mode not being generated
- From: Richard Henderson <rth at redhat dot com>
- To: Andrew Pinski <pinskia at physics dot uc dot edu>
- Cc: "gcc-patches at gcc dot gnu dot org Patches" <gcc-patches at gcc dot gnu dot org>, Steven Bosscher <stevenb at suse dot de>
- Date: Sat, 13 Nov 2004 22:48:14 -0800
- Subject: Re: [PATCH] Fixes some of PR 18463 and 17647, i386 address mode not being generated
- References: <53767E93-35F8-11D9-89EF-000A95D692F4@physics.uc.edu>
On Sat, Nov 13, 2004 at 11:47:45PM -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))));
> + }
> + break;
> + default:
> + break;
> +
> + }
> + if (new)
> + {
> + x = gen_lowpart (mode, new);
> + code = GET_CODE (x);
> + }
> +
> + /* Now recursively process each operand of this operation. */
> + fmt = GET_RTX_FORMAT (code);
> + for (i = 0; i < GET_RTX_LENGTH (code); i++)
> + if (fmt[i] == 'e')
> + {
> + new = canon_for_address (XEXP (x, i));
> + XEXP (x, i) = new;
> + }
> + return x;
Think about the path through this function via ashift and tell me
what two unnecessary bits of work you see.
r~