Make more use of subreg_size_lowpart_offset
authorRichard Sandiford <richard.sandiford@linaro.org>
Sun, 22 Oct 2017 21:07:50 +0000 (21:07 +0000)
committerRichard Sandiford <rsandifo@gcc.gnu.org>
Sun, 22 Oct 2017 21:07:50 +0000 (21:07 +0000)
commite10326ff910ab337741d0781a536435d51c5f044
treec06a568f9e31903ca74a6e355e410a71dfe83311
parentcae115d6d4552a29efb4ea94363d63bde985b4d8
Make more use of subreg_size_lowpart_offset

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.

2017-10-22  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.

Co-Authored-By: Alan Hayward <alan.hayward@arm.com>
Co-Authored-By: David Sherwood <david.sherwood@arm.com>
From-SVN: r253989
gcc/ChangeLog
gcc/lra-spills.c
gcc/regcprop.c
gcc/reload1.c