From: Christophe Lyon Date: Wed, 24 Mar 2021 08:51:41 +0000 (+0000) Subject: arm: Fix MVE constraints for movmisalign [PR target/99727] X-Git-Tag: basepoints/gcc-12~441 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=79cdbabbc4cbf79491c274220928406dff3d4039;p=thirdparty%2Fgcc.git arm: Fix MVE constraints for movmisalign [PR target/99727] MVE has different constraints than Neon for load/store: we should use the Ux constraint instead of Um. 2021-03-24 Christophe Lyon PR target/99727 gcc/ * config/arm/mve.md (movmisalign_mve_store): Use Ux constraint. (movmisalign_mve_load): Likewise. gcc/testsuite/ * gcc.target/arm/pr99727.c: New test. --- diff --git a/gcc/config/arm/mve.md b/gcc/config/arm/mve.md index 440fd6adbacb..135186371e74 100644 --- a/gcc/config/arm/mve.md +++ b/gcc/config/arm/mve.md @@ -10858,7 +10858,7 @@ ) (define_insn "*movmisalign_mve_store" - [(set (match_operand:MVE_VLD_ST 0 "neon_permissive_struct_operand" "=Um") + [(set (match_operand:MVE_VLD_ST 0 "neon_permissive_struct_operand" "=Ux") (unspec:MVE_VLD_ST [(match_operand:MVE_VLD_ST 1 "s_register_operand" " w")] UNSPEC_MISALIGNED_ACCESS))] "((TARGET_HAVE_MVE && VALID_MVE_SI_MODE (mode)) @@ -10871,7 +10871,7 @@ (define_insn "*movmisalign_mve_load" [(set (match_operand:MVE_VLD_ST 0 "s_register_operand" "=w") - (unspec:MVE_VLD_ST [(match_operand:MVE_VLD_ST 1 "neon_permissive_struct_operand" " Um")] + (unspec:MVE_VLD_ST [(match_operand:MVE_VLD_ST 1 "neon_permissive_struct_operand" " Ux")] UNSPEC_MISALIGNED_ACCESS))] "((TARGET_HAVE_MVE && VALID_MVE_SI_MODE (mode)) || (TARGET_HAVE_MVE_FLOAT && VALID_MVE_SF_MODE (mode))) diff --git a/gcc/testsuite/gcc.target/arm/pr99727.c b/gcc/testsuite/gcc.target/arm/pr99727.c new file mode 100644 index 000000000000..92585e286aae --- /dev/null +++ b/gcc/testsuite/gcc.target/arm/pr99727.c @@ -0,0 +1,13 @@ +/* { dg-do compile } */ +/* { dg-require-effective-target arm_v8_1m_mve_ok } */ +/* { dg-options "-O3" } */ +/* { dg-add-options arm_v8_1m_mve } */ + +char a[7][25][15][14]; +void b() { + for (int c;; ++c) + for (int d = 0; d < 25; ++d) + for (int e = 0; e < 15; ++e) + for (int f = 0; f < 14; ++f) + a[c][d][e][f] = 1; +}