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

2016-08-17 Thread Ulrich Weigand
Alan Modra wrote: > PR rtl-optimization/72771 > * reload.c (find_reloads): Don't assume that a subreg mem is OK > when find_reloads_toplev returns address_reloaded==-1. > (alternative_allows_const_pool_ref): Update comment. > testsuite/ > * gcc.c-torture/compile/pr727

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

2016-08-08 Thread Segher Boessenkool
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 O

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

2016-08-08 Thread Alan Modra
On Mon, Aug 08, 2016 at 03:52:31AM -0500, Segher Boessenkool wrote: > On Mon, Aug 08, 2016 at 05:03:46PM +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 > >

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

2016-08-08 Thread Segher Boessenkool
On Mon, Aug 08, 2016 at 05:03:46PM +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 point

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

2016-08-08 Thread Alan Modra
On Mon, Aug 08, 2016 at 12:55:59PM +0930, Alan Modra wrote: > On Mon, Aug 08, 2016 at 12:13:18PM +0930, Alan Modra wrote: > > This patch fixes a case where reload blindly assumes a subreg mem > > is OK if its address has been partially reloaded by > > legitimize_reload_address. The change ought to

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

2016-08-07 Thread Alan Modra
On Mon, Aug 08, 2016 at 12:13:18PM +0930, Alan Modra wrote: > This patch fixes a case where reload blindly assumes a subreg mem > is OK if its address has been partially reloaded by > legitimize_reload_address. The change ought to be fairly obvious > considering that the analogous non-subreg case

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

2016-08-07 Thread Alan Modra
This patch fixes a case where reload blindly assumes a subreg mem is OK if its address has been partially reloaded by legitimize_reload_address. The change ought to be fairly obvious considering that the analogous non-subreg case only gives a win to address_reloaded[i] == 1. Bootstrapped and regr