> -----Original Message----- > From: Gcc-patches <gcc-patches-boun...@gcc.gnu.org> On Behalf Of > Christophe Lyon via Gcc-patches > Sent: 24 March 2021 08:59 > To: gcc-patches@gcc.gnu.org > Subject: [PATCH] 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. Ok. Thanks, Kyrill > > 2021-03-24 Christophe Lyon <christophe.l...@linaro.org> > > PR target/99727 > gcc/ > * config/arm/mve.md (movmisalign<mode>_mve_store): Use Ux > constraint. > (movmisalign<mode>_mve_load): Likewise. > > gcc/testsuite/ > * gcc.target/arm/pr99727.c: New test. > --- > gcc/config/arm/mve.md | 4 ++-- > gcc/testsuite/gcc.target/arm/pr99727.c | 13 +++++++++++++ > 2 files changed, 15 insertions(+), 2 deletions(-) > create mode 100644 gcc/testsuite/gcc.target/arm/pr99727.c > > diff --git a/gcc/config/arm/mve.md b/gcc/config/arm/mve.md > index 440fd6a..1351863 100644 > --- a/gcc/config/arm/mve.md > +++ b/gcc/config/arm/mve.md > @@ -10858,7 +10858,7 @@ (define_insn "arm_vcx3q<a>_p_v16qi" > ) > > (define_insn "*movmisalign<mode>_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>mode)) > @@ -10871,7 +10871,7 @@ (define_insn > "*movmisalign<mode>_mve_store" > > (define_insn "*movmisalign<mode>_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>mode)) > || (TARGET_HAVE_MVE_FLOAT && VALID_MVE_SF_MODE > (<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 0000000..92585e2 > --- /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; > +} > -- > 2.7.4
RE: [PATCH] arm: Fix MVE constraints for movmisalign [PR target/99727]
Kyrylo Tkachov via Gcc-patches Wed, 24 Mar 2021 07:02:21 -0700
- [PATCH] arm: Fix MVE constraints for movmi... Christophe Lyon via Gcc-patches
- RE: [PATCH] arm: Fix MVE constraints ... Kyrylo Tkachov via Gcc-patches