This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH] Fix ubsan expansion of multiplication (PR rtl-optimization/60030)
- From: Jakub Jelinek <jakub at redhat dot com>
- To: Richard Henderson <rth at redhat dot com>
- Cc: Richard Biener <rguenther at suse dot de>, Jeff Law <law at redhat dot com>, gcc-patches at gcc dot gnu dot org
- Date: Thu, 6 Feb 2014 17:02:03 +0100
- Subject: Re: [PATCH] Fix ubsan expansion of multiplication (PR rtl-optimization/60030)
- Authentication-results: sourceware.org; auth=none
- References: <20140204124045 dot GJ12671 at tucnak dot redhat dot com> <52F3A203 dot 3090109 at redhat dot com>
- Reply-to: Jakub Jelinek <jakub at redhat dot com>
On Thu, Feb 06, 2014 at 06:53:55AM -0800, Richard Henderson wrote:
> On 02/04/2014 04:40 AM, Jakub Jelinek wrote:
> > - tem = expand_shift (LSHIFT_EXPR, mode, lopart, hprec, NULL_RTX, 1);
> > + tem = gen_rtx_SUBREG (mode, lopart, 0);
> > + tem = expand_shift (LSHIFT_EXPR, mode, tem, hprec, NULL_RTX, 1);
>
> I would be happier with gen_lowpart rather than the explicit gen_rtx_subreg.
I need a paradoxical subreg, gen_lowpart ICEs in that case
(for ppc* here lopart is SImode, I need DImode paradoxical subreg of that,
so that I can shift it up by 32 bits and thus get a DImode value
with the lopart bits in the upper 32 bits and zero in the rest.
Jakub