This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: PING: PATCH [9/n]: Prepare x32: PR middle-end/47383: ivopts miscompiles Pmode != ptr_mode
- From: "Ulrich Weigand" <uweigand at de dot ibm dot com>
- To: richard dot guenther at gmail dot com (Richard Guenther)
- Cc: hjl dot tools at gmail dot com (H.J. Lu), gcc-patches at gcc dot gnu dot org, Ulrich dot Weigand at de dot ibm dot com (Ulrich Weigand)
- Date: Tue, 5 Jul 2011 18:10:39 +0200 (CEST)
- Subject: Re: PING: PATCH [9/n]: Prepare x32: PR middle-end/47383: ivopts miscompiles Pmode != ptr_mode
Richard Guenther wrote:
> On Tue, Jul 5, 2011 at 4:56 PM, Ulrich Weigand <uweigand@de.ibm.com> wrote:
> > Can you elaborate? =A0We are talking about the mode returned from
> > addr_for_mem_ref here. =A0I do now understand how this can be anything
> > but an address mode:
>
> That is an address mode, but the intermediate computation
> (base + index * step + offset) is done in pointer mode. The
> code currently performs this in address mode as well which is
> bogus. Which is why I suggested to use pointer mode for the
> computation (now, with the other target hook you mention) and
> then convert the result to address mode.
Ah, OK. Yes, this does make sense ...
Thanks,
Ulrich
--
Dr. Ulrich Weigand
GNU Toolchain for Linux on System z and Cell BE
Ulrich.Weigand@de.ibm.com