[AArch64] Reject invalid subregs involving partial SVE modes
authorRichard Sandiford <richard.sandiford@arm.com>
Thu, 19 Dec 2019 13:36:16 +0000 (13:36 +0000)
committerRichard Sandiford <rsandifo@gcc.gnu.org>
Thu, 19 Dec 2019 13:36:16 +0000 (13:36 +0000)
commit76607e7e5f5ef67e4a469fdf2a320118ff2fa25a
treea0de6df37de444fc88a84ccdb4f1f9d07d046f66
parent6aa5370cccf7c0475192dc8c641450722ae1e477
[AArch64] Reject invalid subregs involving partial SVE modes

When adding partial SVE modes, I'd remembered to handle reloads
in a similar way to full big-endian SVE vectors, but forgot the
just-as-important mode-change rules.

2019-12-19  Richard Sandiford  <richard.sandiford@arm.com>

gcc/
* config/aarch64/aarch64.c (aarch64_can_change_mode_class):
Don't allow changes between partial SVE modes and other kinds
of mode.  Don't allow changes between two partial SVE modes
if they have different container or element sizes.

gcc/testsuite/
* gcc.target/aarch64/sve/mixed_size_8.c: New test.

From-SVN: r279572
gcc/ChangeLog
gcc/config/aarch64/aarch64.c
gcc/testsuite/ChangeLog
gcc/testsuite/gcc.target/aarch64/sve/mixed_size_8.c [new file with mode: 0644]