This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [RFA][PATCH][pr target/60648] Fix non-canonical RTL from x86 backend -- P1 regression
- From: Jakub Jelinek <jakub at redhat dot com>
- To: Jeff Law <law at redhat dot com>
- Cc: Richard Henderson <rth at redhat dot com>, Uros Bizjak <ubizjak at gmail dot com>, gcc-patches <gcc-patches at gcc dot gnu dot org>, rdsandiford at googlemail dot com
- Date: Thu, 27 Mar 2014 17:23:19 +0100
- Subject: Re: [RFA][PATCH][pr target/60648] Fix non-canonical RTL from x86 backend -- P1 regression
- Authentication-results: sourceware.org; auth=none
- References: <53330838 dot 7010402 at redhat dot com> <20140326181259 dot GK1817 at tucnak dot redhat dot com> <533319C7 dot 5060201 at redhat dot com> <20140326182808 dot GM1817 at tucnak dot redhat dot com> <53332B5C dot 9030409 at redhat dot com> <20140326194005 dot GO1817 at tucnak dot redhat dot com> <53332FEA dot 20101 at redhat dot com> <877g7g39uc dot fsf at talisman dot default> <20140327135157 dot GY1817 at tucnak dot redhat dot com> <53344F16 dot 7080101 at redhat dot com>
- Reply-to: Jakub Jelinek <jakub at redhat dot com>
On Thu, Mar 27, 2014 at 10:17:26AM -0600, Jeff Law wrote:
> >Did you mean Jeff's original change, or say:
> >--- gcc/config/i386/i386.c 2014-03-20 17:41:45.917689676 +0100
> >+++ gcc/config/i386/i386.c 2014-03-27 14:47:21.876254288 +0100
> >@@ -13925,13 +13925,13 @@ ix86_legitimize_address (rtx x, rtx oldx
> > if (GET_CODE (XEXP (x, 0)) == MULT)
> > {
> > changed = 1;
> >- XEXP (x, 0) = force_operand (XEXP (x, 0), 0);
> >+ XEXP (x, 0) = copy_addr_to_reg (XEXP (x, 0));
> > }
> >
> > if (GET_CODE (XEXP (x, 1)) == MULT)
> > {
> > changed = 1;
> >- XEXP (x, 1) = force_operand (XEXP (x, 1), 0);
> >+ XEXP (x, 1) = copy_addr_to_reg (XEXP (x, 1));
> > }
> >
> > if (changed
> >(or copy_to_reg, should be the same thing).
> copy_addr_to_reg is probably better since it forces us into Pmode
> (which is useful if we had a mode-less constant).
Well, but in both of these cases you know that what you pass in is
a MULT and thus never mode-less. That said, copy_addr_to_reg has the
advantage that it will ICE if the MULT isn't Pmode, but that really should
never happen for addresses, so not a big difference.
Jakub