]> git.ipfire.org Git - thirdparty/gcc.git/commit
arm: Fix mve_vshlq* [PR99593]
authorJakub Jelinek <jakub@redhat.com>
Fri, 19 Mar 2021 12:48:44 +0000 (13:48 +0100)
committerJakub Jelinek <jakub@redhat.com>
Fri, 19 Mar 2021 12:48:44 +0000 (13:48 +0100)
commit009528d61c796608affd1eaa18ae31a3679eb46d
treefcb492d7d60c4f66357bd39cb0049b13678c62ec
parent5cded5aff76c15e48f689842b9aba1d1df5e3c54
arm: Fix mve_vshlq* [PR99593]

As mentioned in the PR, before the r11-6708-gbfab355012ca0f5219da8beb04f2fdaf757d34b7
change v[al]shr<mode>3 expanders were expanding the shifts by register
to gen_ashl<mode>3_{,un}signed which don't support immediate CONST_VECTOR
shift amounts, but now expand to mve_vshlq_<supf><mode> which does.
The testcase ICEs, because the constraint doesn't match the predicate and
because LRA works solely with the constraints, so it can e.g. from REG_EQUAL
propagate there a CONST_VECTOR which matches the constraint but fails the
predicate and only later on other passes will notice the predicate fails
and ICE.

Fixed by adding a constraint that matches the immediate part of the
predicate.

PR target/99593
* config/arm/constraints.md (Ds): New constraint.
* config/arm/vec-common.md (mve_vshlq_<supf><mode>): Use w,Ds
constraint instead of w,Dm.

* g++.target/arm/pr99593.C: New test.
gcc/config/arm/constraints.md
gcc/config/arm/vec-common.md
gcc/testsuite/g++.target/arm/pr99593.C [new file with mode: 0644]