]> gcc.gnu.org Git - gcc.git/commit
arm: Fix up neon_vector_mem_operand [PR97528]
authorJakub Jelinek <jakub@redhat.com>
Fri, 20 Nov 2020 11:26:58 +0000 (12:26 +0100)
committerJakub Jelinek <jakub@redhat.com>
Fri, 20 Nov 2020 11:26:58 +0000 (12:26 +0100)
commit410b8f6f41920dad200cd709f9f3de8b840a995c
tree9db559784eb47ef5d13d670c0c0c0a3a53cb6f25
parent1b3c9813675dc8e3ca03aa6c1624c668ac7fea1d
arm: Fix up neon_vector_mem_operand [PR97528]

The documentation for POST_MODIFY says:
   Currently, the compiler can only handle second operands of the
   form (plus (reg) (reg)) and (plus (reg) (const_int)), where
   the first operand of the PLUS has to be the same register as
   the first operand of the *_MODIFY.
The following testcase ICEs, because combine just attempts to simplify
things and ends up with
(post_modify (reg1) (plus (mult (reg2) (const_int 4)) (reg1))
but the target predicates accept it, because they only verify
that POST_MODIFY's second operand is PLUS and the second operand
of the PLUS is a REG.

The following patch fixes this by performing further verification that
the POST_MODIFY is in the form it should be.

2020-11-20  Jakub Jelinek  <jakub@redhat.com>

PR target/97528
* config/arm/arm.c (neon_vector_mem_operand): For POST_MODIFY, require
first POST_MODIFY operand is a REG and is equal to the first operand
of PLUS.

* gcc.target/arm/pr97528.c: New test.
gcc/config/arm/arm.c
gcc/testsuite/gcc.target/arm/pr97528.c [new file with mode: 0644]
This page took 0.06342 seconds and 5 git commands to generate.