This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
RE: [PATCH, reload] Fix bug pr52804, RELOAD pass reloads wrong register on ARM for cortex-m0
- From: "Bin Cheng" <bin dot cheng at arm dot com>
- To: "'Ulrich Weigand'" <uweigand at de dot ibm dot com>
- Cc: <gcc-patches at gcc dot gnu dot org>
- Date: Thu, 3 May 2012 10:31:35 +0800
- Subject: RE: [PATCH, reload] Fix bug pr52804, RELOAD pass reloads wrong register on ARM for cortex-m0
- References: <016101cd1eb9$8f4f14c0$aded3e40$@cheng@arm.com> from "Bin Cheng" at Apr 20, 2012 01:50:55 PM <201205021605.q42G5Eu5029415@d06av02.portsmouth.uk.ibm.com>
> -----Original Message-----
> From: Ulrich Weigand [mailto:uweigand@de.ibm.com]
> Sent: Thursday, May 03, 2012 12:05 AM
> To: Bin Cheng
> Cc: gcc-patches@gcc.gnu.org
> Subject: Re: [PATCH, reload] Fix bug pr52804, RELOAD pass reloads wrong
> register on ARM for cortex-m0
>
> Bin Cheng wrote:
>
> > In short, I think the confliction of reloads with type
> > RELOAD_FOR_INPADDR_ADDRESS and type RELOAD_FOR_INPUT_ADDRESS should be
> > handled in "reload_reg_reaches_end_p".
> > Also I think RELOAD_FOR_OUTPUT_ADDRESS/RELOAD_FOR_OUTADDR_ADDRESS have
> > the issue symmetrically, though I have no test case for it.
>
> Yes, I agree with your reasoning here. This looks like an oversight.
>
> > PR target/52804
> > * reload1.c (reload_reg_reaches_end_p): Check whether successor
> > reload with
> > type RELOAD_FOR_INPUT_ADDRESS kills reload register of current one
> > with type
> > RELOAD_FOR_INPADDR_ADDRESS.
>
> This is OK. (You also ought to mention the RELOAD_FOR_OUTADDR_ADDRESS
part of
> the change in the ChangeLog.)
Thanks for reviewing, I modified the ChangeLog. Is it ok for trunk and 4.7?
I am not sure whether this can be treated as a regression in 4.7 branch
since
PR52804 has not been confirmed yet.
2012-05-03 Bin Cheng <bin.cheng@arm.com>
PR target/52804
* reload1.c (reload_reg_reaches_end_p): Check whether successor
reload with
type RELOAD_FOR_INPUT_ADDRESS kills reload register of current one
with type
RELOAD_FOR_INPADDR_ADDRESS.
Same stands for RELOAD_FOR_OUTPUT_ADDRESS and
RELOAD_FOR_OUTADDR_ADDRESS.