[PATCH, RELOAD] Don't assume subreg mem address is ok

Segher Boessenkool segher@kernel.crashing.org
Mon Aug 8 10:41:00 GMT 2016


On Mon, Aug 08, 2016 at 07:15:01PM +0930, Alan Modra wrote:
> > > Segher, is this rs6000 patch OK?  Bootstrapped as above.
> > > 
> > > 	PR target/72771
> > > 	* config/rs6000/rs6000.c (toc_relative_expr_p): Allow lo_sum/high
> > > 	toc refs created during reload.
> > 
> > >  /* Return true if OP is a toc pointer relative address (the output
> > > -   of create_TOC_reference).  If STRICT, do not match high part or
> > > -   non-split -mcmodel=large/medium toc pointer relative addresses.  */
> > > +   of create_TOC_reference).  If STRICT, do not match non-split
> > > +   -mcmodel=large/medium toc pointer relative addresses.  */
> > 
> > Why this comment change?  The code still does not allow high part if
> > strict?  The changelog says it does now, is the code correct?
> 
> The code is now correct, and allows (lo_sum (high (...)) style
> addresses created during reload when non-strict.  That's what I meant
> by the ChangeLog entry.

Aha.  "lo_sum of high", perhaps, although that also does not make much
sense unless you already know what it is talking about.  I read "/" as
"or".

> I felt that saying "do not match high" in the function comment is
> extraneous as one form of the non-split insn is
> (lo_sum (high (unspec [sym r2] UNSPEC_TOCREL))
>         (unspec [sym r2] UNSPEC_TOCREL))
> The other is plain (unspec [sym r2] UNSPEC_TOCREL).

It said that it does not allow just  (high ...)  I think.  There of
course are lots of other things it does not match ;-)

Okay for trunk.  Please note in the changelog that you changed the comment.

Thanks,


Segher



More information about the Gcc-patches mailing list