arm: MVE: Fix vec extracts to memory
authorAndre Simoes Dias Vieira <andre.simoesdiasvieira@arm.com>
Tue, 7 Apr 2020 14:29:31 +0000 (15:29 +0100)
committerAndre Vieira <andre.simoesdiasvieira@arm.com>
Tue, 7 Apr 2020 14:44:52 +0000 (15:44 +0100)
commit302b6836280d07464f65d7be2433ab4ecc92e1ce
tree0eb8358856febe613b51dc48ccd66c01694e4c1c
parentd2ce75fef9fda5c7ff89c4287b30492225f07401
arm: MVE: Fix vec extracts to memory

This patch fixes vec extracts to memory that can arise from code as seen in the
testcase added. The patch fixes this by allowing mem operands in the set of
mve_vec_extract patterns, which given the only '=r' constraint will lead to the
scalar value being written to a register and then stored in memory using scalar
store pattern.

gcc/ChangeLog:
2020-04-07  Andre Vieira  <andre.simoesdiasvieira@arm.com>

* config/arm/mve.md (mve_vec_extract*): Allow memory operands in set.

gcc/testsuite/ChangeLog:
2020-04-07  Andre Vieira  <andre.simoesdiasvieira@arm.com>

* gcc.target/arm/mve/intrinsics/mve_vec_extracts_from_memory.c: New
test.
gcc/ChangeLog
gcc/config/arm/mve.md
gcc/testsuite/ChangeLog
gcc/testsuite/gcc.target/arm/mve/intrinsics/mve_vec_extracts_from_memory.c [new file with mode: 0644]