]> git.ipfire.org Git - thirdparty/gcc.git/commit
[arm] Fix MVE addressing modes for VLDR[BHW] and VSTR[BHW]
authorAndre Vieira <andre.simoesdiasvieira@arm.com>
Wed, 13 Oct 2021 15:42:47 +0000 (16:42 +0100)
committerAndre Vieira <andre.simoesdiasvieira@arm.com>
Wed, 13 Oct 2021 15:44:03 +0000 (16:44 +0100)
commit5efeaa0d29525fa28e189e6278c1b1651fb0d7bf
treeb295b1d5cae56f6685ce89fdcbd415f871366787
parent20995e68c28c1091be915f5ab4fcfa45c1cd0bc5
[arm] Fix MVE addressing modes for VLDR[BHW] and VSTR[BHW]

The way we were previously dealing with addressing modes for MVE was preventing
the use of pre, post and offset addressing modes for the normal loads and
stores, including widening and narrowing.  This patch fixes that and
adds tests to ensure we are capable of using all the available addressing
modes.

gcc/ChangeLog:
2021-10-12  Andre Vieira  <andre.simoesdiasvieira@arm.com>

* config/arm/arm.c (thumb2_legitimate_address_p): Use VALID_MVE_MODE
when checking mve addressing modes.
(mve_vector_mem_operand): Fix the way we handle pre, post and offset
addressing modes.
(arm_print_operand): Fix printing of POST_ and PRE_MODIFY.
* config/arm/mve.md: Use mve_memory_operand predicate everywhere where
there is a single Ux constraint.

gcc/testsuite/ChangeLog:
2021-10-12  Andre Vieira  <andre.simoesdiasvieira@arm.com>

* gcc.target/arm/mve/mve.exp: Make it test main directory.
* gcc.target/arm/mve/mve_load_memory_modes.c: New test.
* gcc.target/arm/mve/mve_store_memory_modes.c: New test.
gcc/config/arm/arm.c
gcc/config/arm/mve.md
gcc/testsuite/gcc.target/arm/mve/mve.exp
gcc/testsuite/gcc.target/arm/mve/mve_load_memory_modes.c [new file with mode: 0644]
gcc/testsuite/gcc.target/arm/mve/mve_store_memory_modes.c [new file with mode: 0644]