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: Fix reload inheritance of post-modified addresses.


Richard Sandiford wrote:

> This patch fixes a miscompilation of SPEC2006 gromacs with ARM+VFP.
> Thanks to Dave Gilbert for narrowing down the failure to a particular
> rtl instruction and a particular group of flags.

Thanks for the detailed explanation of the problem!

> I don't really like the way the POST_INC and POST_DEC code seems to
> deliberately record an invalid equivalence and then fix it up later,
> but it seems to have worked.  I'm reluctant to run the risk of
> pessimising it (or introducing new bugs) by handling it in the same
> way as POST_MODIFY.  I'll give it a try though if that's preferred.
>
> As things stand, I think the patch below is the correct fix.

I agree the patch below should fix the problem, and it is definitely
a conservative change, given we are in stage 4 right now.

At some later point, it might be helpful to look into further changes
to make POST_INC/POST_DEC handling more similar to POST_MODIFY again ...

> gcc/
> 	* reload1.c (emit_reload_insns): Don't record equivalences for
> 	POST_MODIFY addresses.
> 
> gcc/testsuite/
> 	* gcc.c-torture/execute/postmod-1.c: New test.

This is OK.

Thanks,
Ulrich

-- 
  Dr. Ulrich Weigand
  GNU Toolchain for Linux on System z and Cell BE
  Ulrich.Weigand@de.ibm.com


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