[AArch64] Tighten address register subreg checks
authorRichard Sandiford <richard.sandiford@linaro.org>
Thu, 31 Aug 2017 10:11:41 +0000 (10:11 +0000)
committerRichard Sandiford <rsandifo@gcc.gnu.org>
Thu, 31 Aug 2017 10:11:41 +0000 (10:11 +0000)
commit76160199989decf5437de4def4d628b04d5ad68a
treee0f6f0e8697b12bebc8ddd5b704295f42ece7c09
parent5f5653148b94593632986155b4f283150c52b83d
[AArch64] Tighten address register subreg checks

Previously we allowed subregs of non-GPR modes to be base and index
registers in non-strict mode.  In practice such subregs will always
require a reload, so we get better code by disallowing them.

2017-08-31  Richard Sandiford  <richard.sandiford@linaro.org>
    Alan Hayward  <alan.hayward@arm.com>
    David Sherwood  <david.sherwood@arm.com>

gcc/
* config/aarch64/aarch64.c (aarch64_base_register_rtx_p): Only allow
subregs whose inner modes can be stored in GPRs.
(aarch64_classify_index): Likewise.

Co-Authored-By: Alan Hayward <alan.hayward@arm.com>
Co-Authored-By: David Sherwood <david.sherwood@arm.com>
From-SVN: r251557
gcc/ChangeLog
gcc/config/aarch64/aarch64.c