diff options
author | Richard Sandiford <richard.sandiford@arm.com> | 2024-07-22 16:42:15 +0100 |
---|---|---|
committer | Thomas Koenig <tkoenig@gcc.gnu.org> | 2024-07-28 19:05:44 +0200 |
commit | aab585a37c84e99a04c3b159e97517ae36ee9cde (patch) | |
tree | 14faf5da8d1b72e1ef5501b6e847c60d134faa67 /gcc/cp/tree.cc | |
parent | 5a3562e3873d5b6ce6fce30ae84e6f80b047ed1b (diff) | |
download | gcc-aab585a37c84e99a04c3b159e97517ae36ee9cde.zip gcc-aab585a37c84e99a04c3b159e97517ae36ee9cde.tar.gz gcc-aab585a37c84e99a04c3b159e97517ae36ee9cde.tar.bz2 |
aarch64: Tighten aarch64_simd_mem_operand_p [PR115969]
aarch64_simd_mem_operand_p checked for a memory with a POST_INC
or REG address, but it didn't check what kind of register was
being used. This meant that it allowed DImode FPRs as well as GPRs.
I wondered about rewriting it to use aarch64_classify_address,
but this one-line fix seemed simpler. The structure then mirrors
the existing early exit in aarch64_classify_address itself:
/* On LE, for AdvSIMD, don't support anything other than POST_INC or
REG addressing. */
if (advsimd_struct_p
&& TARGET_SIMD
&& !BYTES_BIG_ENDIAN
&& (code != POST_INC && code != REG))
return false;
gcc/
PR target/115969
* config/aarch64/aarch64.cc (aarch64_simd_mem_operand_p): Require
the operand to be a legitimate memory_operand.
gcc/testsuite/
PR target/115969
* gcc.target/aarch64/pr115969.c: New test.
Diffstat (limited to 'gcc/cp/tree.cc')
0 files changed, 0 insertions, 0 deletions