aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorChristophe Lyon <christophe.lyon@linaro.org>2025-01-07 16:59:03 +0000
committerChristophe Lyon <christophe.lyon@linaro.org>2025-01-08 07:15:32 +0000
commit42b24557bdf805d2913d3c75531fe441b1634332 (patch)
tree57f0ecd75f87a033fe909daa502bd866866859a0 /gcc
parent51708cbd751e3af0d147ceae4da5c74dae1519ce (diff)
downloadgcc-42b24557bdf805d2913d3c75531fe441b1634332.zip
gcc-42b24557bdf805d2913d3c75531fe441b1634332.tar.gz
gcc-42b24557bdf805d2913d3c75531fe441b1634332.tar.bz2
arm: [MVE intrinsics] Fix tuples field name (PR 118332)
A recent commit mistakenly changed the field name for tuples from 'val' to '__val', but unlike SVE this name is mandated by ACLE. The patch simply switches back the name to 'val'. PR target/118332 gcc/ChangeLog: * config/arm/arm-mve-builtins.cc (wrap_type_in_struct): Use 'val' instead of '__val'. gcc/testsuite/ChangeLog: * gcc.target/arm/mve/intrinsics/pr118332.c: New test.
Diffstat (limited to 'gcc')
-rw-r--r--gcc/config/arm/arm-mve-builtins.cc5
-rw-r--r--gcc/testsuite/gcc.target/arm/mve/intrinsics/pr118332.c5
2 files changed, 7 insertions, 3 deletions
diff --git a/gcc/config/arm/arm-mve-builtins.cc b/gcc/config/arm/arm-mve-builtins.cc
index aacdbf1..4c52415 100644
--- a/gcc/config/arm/arm-mve-builtins.cc
+++ b/gcc/config/arm/arm-mve-builtins.cc
@@ -464,13 +464,12 @@ register_vector_type (vector_type_index type)
}
/* Return a structure type that contains a single field of type FIELD_TYPE.
- The field is called __val, but that's an internal detail rather than
- an exposed part of the API. */
+ The field is called 'val', as mandated by ACLE. */
static tree
wrap_type_in_struct (tree field_type)
{
tree field = build_decl (input_location, FIELD_DECL,
- get_identifier ("__val"), field_type);
+ get_identifier ("val"), field_type);
tree struct_type = lang_hooks.types.make_type (RECORD_TYPE);
DECL_FIELD_CONTEXT (field) = struct_type;
TYPE_FIELDS (struct_type) = field;
diff --git a/gcc/testsuite/gcc.target/arm/mve/intrinsics/pr118332.c b/gcc/testsuite/gcc.target/arm/mve/intrinsics/pr118332.c
new file mode 100644
index 0000000..a8f6389
--- /dev/null
+++ b/gcc/testsuite/gcc.target/arm/mve/intrinsics/pr118332.c
@@ -0,0 +1,5 @@
+/* { dg-require-effective-target arm_v8_1m_mve_ok } */
+/* { dg-add-options arm_v8_1m_mve } */
+
+#include <arm_mve.h>
+uint32x4_t first(uint32x4x4_t a) { return a.val[0]; }