diff options
author | Jakub Jelinek <jakub@redhat.com> | 2021-03-19 13:48:44 +0100 |
---|---|---|
committer | Jakub Jelinek <jakub@redhat.com> | 2021-03-19 13:48:44 +0100 |
commit | 009528d61c796608affd1eaa18ae31a3679eb46d (patch) | |
tree | fcb492d7d60c4f66357bd39cb0049b13678c62ec /gcc/config/arm/vec-common.md | |
parent | 5cded5aff76c15e48f689842b9aba1d1df5e3c54 (diff) | |
download | gcc-009528d61c796608affd1eaa18ae31a3679eb46d.zip gcc-009528d61c796608affd1eaa18ae31a3679eb46d.tar.gz gcc-009528d61c796608affd1eaa18ae31a3679eb46d.tar.bz2 |
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.
Diffstat (limited to 'gcc/config/arm/vec-common.md')
-rw-r--r-- | gcc/config/arm/vec-common.md | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/gcc/config/arm/vec-common.md b/gcc/config/arm/vec-common.md index 345ada0..d7011c6 100644 --- a/gcc/config/arm/vec-common.md +++ b/gcc/config/arm/vec-common.md @@ -299,7 +299,7 @@ (define_insn "mve_vshlq_<supf><mode>" [(set (match_operand:VDQIW 0 "s_register_operand" "=w,w") (unspec:VDQIW [(match_operand:VDQIW 1 "s_register_operand" "w,w") - (match_operand:VDQIW 2 "imm_lshift_or_reg_neon" "w,Dm")] + (match_operand:VDQIW 2 "imm_lshift_or_reg_neon" "w,Ds")] VSHLQ))] "ARM_HAVE_<MODE>_ARITH && !TARGET_REALLY_IWMMXT" "@ |