This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH] Fix PR55876 - Make generation of paradoxical subreg in widen_operand more robust


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~


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]