This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [58/77] Use scalar_int_mode in a try_combine optimisation
- From: Jeff Law <law at redhat dot com>
- To: gcc-patches at gcc dot gnu dot org, richard dot sandiford at linaro dot org
- Date: Thu, 24 Aug 2017 15:32:31 -0600
- Subject: Re: [58/77] Use scalar_int_mode in a try_combine optimisation
- Authentication-results: sourceware.org; auth=none
- Authentication-results: ext-mx04.extmail.prod.ext.phx2.redhat.com; dmarc=none (p=none dis=none) header.from=redhat.com
- Authentication-results: ext-mx04.extmail.prod.ext.phx2.redhat.com; spf=fail smtp.mailfrom=law at redhat dot com
- Dmarc-filter: OpenDMARC Filter v1.3.2 mx1.redhat.com 280F67EA90
- References: <8760ewohsv.fsf@linaro.org> <877ezcemqp.fsf@linaro.org>
On 07/13/2017 02:59 AM, Richard Sandiford wrote:
> This patch uses scalar_int_modes for:
>
> /* If I2 is setting a pseudo to a constant and I3 is setting some
> sub-part of it to another constant, merge them by making a new
> constant. */
>
> This was already implicit, but the danger with checking only
> CONST_SCALAR_INT_P is that it can include CC values too.
>
> 2017-07-13 Richard Sandiford <richard.sandiford@linaro.org>
> Alan Hayward <alan.hayward@arm.com>
> David Sherwood <david.sherwood@arm.com>
>
> gcc/
> * combine.c (try_combine): Use is_a <scalar_int_mode> when
> trying to combine a full-register integer set with a subreg
> integer set.
OK. I briefly mis-read the SET_DEST in the is_a as a SET_SRC (which in
this context could have VOIDmode). But you're getting the mode from the
dest :-)
jeff