Make more use of subreg_size_lowpart_offset

Jeff Law law@redhat.com
Thu Oct 12 18:21:00 GMT 2017


On 08/23/2017 04:52 AM, Richard Sandiford wrote:
> This patch uses subreg_size_lowpart_offset in places that open-coded
> the calculation.  The reload use (and the LRA one that was based on it)
> seemed to ignore the BYTES_BIG_ENDIAN != WORDS_BIG_ENDIAN case; it's not
> obvious whether that was deliberate or an oversight.
> 
> Tested on aarch64-linux-gnu and x86_64-linux-gnu, and by making sure
> that there were no differences in testsuite assembly output for one
> target per CPU.  OK to install?
> 
> Richard
> 
> 
> 2017-08-23  Richard Sandiford  <richard.sandiford@linaro.org>
> 	    Alan Hayward  <alan.hayward@arm.com>
> 	    David Sherwood  <david.sherwood@arm.com>
> 
> gcc/
> 	* lra-spills.c (assign_mem_slot): Use subreg_size_lowpart_offset.
> 	* regcprop.c (maybe_mode_change): Likewise.
> 	* reload1.c (alter_reg): Likewise.
I'm pretty sure the lra/reload case is just an oversight.  It's just
trying to get an adjustment so that it can make a MEM that covers the slot.

It's not absolutely clear to me that the regcprop bits are just an
open-coded subreg_size_lowpart_offset.  But I'll willing to trust you on
that one.

jeff



More information about the Gcc-patches mailing list