This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH] Fix PR55876 - Make generation of paradoxical subreg in widen_operand more robust
- From: Richard Henderson <rth at redhat dot com>
- To: Tom de Vries <Tom_deVries at mentor dot com>
- Cc: Steve Ellcey <sellcey at mips dot com>, Andrew Pinski <pinskia at gmail dot com>, "gcc-patches at gcc dot gnu dot org" <gcc-patches at gcc dot gnu dot org>
- Date: Mon, 07 Jan 2013 09:48:13 -0800
- Subject: Re: [PATCH] Fix PR55876 - Make generation of paradoxical subreg in widen_operand more robust
- References: <50EA9FDD.6000803@mentor.com> <50EAA074.3050402@mentor.com>
On 01/07/2013 02:16 AM, Tom de Vries wrote:
> - /* If MODE is no wider than a single word, we return a paradoxical
> - SUBREG. */
> + /* If MODE is no wider than a single word, we return a
> + lowpart or paradoxical SUBREG. */
> if (GET_MODE_SIZE (mode) <= UNITS_PER_WORD)
> - return gen_rtx_SUBREG (mode, force_reg (GET_MODE (op), op), 0);
> + {
> + if (GET_MODE_SIZE (mode) < GET_MODE_SIZE (GET_MODE (op)))
> + return gen_lowpart_SUBREG (mode, op);
> + else
> + return gen_rtx_SUBREG (mode, force_reg (GET_MODE (op), op), 0);
> + }
Is there any good reason we're using gen_rtx_SUBREG directly here?
Seems like this sort of logic would be present in plain gen_lowpart,
generating the paradoxical subreg that we want.
r~