arm: Enable no-writeback vldr.16/vstr.16.
authorJoe Ramsay <joe.ramsay@arm.com>
Wed, 29 Jul 2020 13:04:28 +0000 (14:04 +0100)
committerKyrylo Tkachov <kyrylo.tkachov@arm.com>
Wed, 29 Jul 2020 13:04:28 +0000 (14:04 +0100)
commit9f6abd2db90151c8966d2d2718ab8c299abf1105
tree186c05e4721e7f04f79eac893978fbccc449e168
parent5175857714cc37b01c4349f37253aea39c6a59b4
arm: Enable no-writeback vldr.16/vstr.16.

There was previously no way to specify that a register operand cannot
have any writeback modifiers, and as a result the argument to vldr.16
and vstr.16 could be erroneously output with post-increment. This
change adds a constraint which forbids all writeback, and
selects it in the relevant case for vldr.16 and vstr.16

Bootstrapped on arm-linux, gcc and CMSIS-DSP testsuites are clean.
Is this patch OK for trunk? If yes, please commit on my behalf as I
don't
have commit rights.

gcc/ChangeLog:

* config/arm/arm-protos.h (arm_coproc_mem_operand_no_writeback):
Declare prototype.
(arm_mve_mode_and_operands_type_check): Declare prototype.
* config/arm/arm.c (arm_coproc_mem_operand): Refactor to use
_arm_coproc_mem_operand.
(arm_coproc_mem_operand_wb): New function to cover full, limited
and no writeback.
(arm_coproc_mem_operand_no_writeback): New constraint for memory
operand with no writeback.
(arm_print_operand): Extend 'E' specifier for memory operand
that does not support writeback.
(arm_mve_mode_and_operands_type_check): New constraint check for
MVE memory operands.
* config/arm/constraints.md: Add Uj constraint for VFP vldr.16
and vstr.16.
* config/arm/vfp.md (*mov_load_vfp_hf16): New pattern for
vldr.16.
(*mov_store_vfp_hf16): New pattern for vstr.16.
(*mov<mode>_vfp_<mode>16): Remove MVE moves.
gcc/config/arm/arm-protos.h
gcc/config/arm/arm.c
gcc/config/arm/constraints.md
gcc/config/arm/vfp.md
gcc/testsuite/gcc.target/arm/mve/intrinsics/mve-vldstr16-no-writeback.c [new file with mode: 0644]