aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorChristophe Lyon <christophe.lyon@linaro.org>2021-03-24 08:51:41 +0000
committerChristophe Lyon <christophe.lyon@linaro.org>2021-03-24 14:22:48 +0000
commit79cdbabbc4cbf79491c274220928406dff3d4039 (patch)
tree5ae8f573e28c425aedc0cbbb7da0a0a96d6ab359 /gcc
parent70b738f96812c369b836d9a5bc5472f4634518bb (diff)
downloadgcc-79cdbabbc4cbf79491c274220928406dff3d4039.zip
gcc-79cdbabbc4cbf79491c274220928406dff3d4039.tar.gz
gcc-79cdbabbc4cbf79491c274220928406dff3d4039.tar.bz2
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 <christophe.lyon@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.
Diffstat (limited to 'gcc')
-rw-r--r--gcc/config/arm/mve.md4
-rw-r--r--gcc/testsuite/gcc.target/arm/pr99727.c13
2 files changed, 15 insertions, 2 deletions
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 "*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_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;
+}