public inbox for gcc-cvs@sourceware.org
help / color / mirror / Atom feed
* [gcc r14-5617] arm: Fix arm_simd_types and MVE scalar_types
@ 2023-11-20 11:24 Christophe Lyon
0 siblings, 0 replies; only message in thread
From: Christophe Lyon @ 2023-11-20 11:24 UTC (permalink / raw)
To: gcc-cvs
https://gcc.gnu.org/g:b8592186611b671d6dc47332ecaf4a4b9c3802fb
commit r14-5617-gb8592186611b671d6dc47332ecaf4a4b9c3802fb
Author: Christophe Lyon <christophe.lyon@linaro.org>
Date: Wed Nov 15 07:50:57 2023 +0000
arm: Fix arm_simd_types and MVE scalar_types
So far we define arm_simd_types and scalar_types using type
definitions like intSI_type_node, etc...
This is causing problems with later patches which re-implement
load/store MVE intrinsics, leading to error messages such as:
error: passing argument 1 of 'vst1q_s32' from incompatible pointer type
note: expected 'int *' but argument is of type 'int32_t *' {aka 'long int *'}
This patch uses get_typenode_from_name (INT32_TYPE) instead, which
defines the types as appropriate for the target/C library.
2023-11-16 Christophe Lyon <christophe.lyon@linaro.org>
gcc/
* config/arm/arm-builtins.cc (arm_init_simd_builtin_types): Fix
initialization of arm_simd_types[].eltype.
* config/arm/arm-mve-builtins.def (DEF_MVE_TYPE): Fix scalar
types.
Diff:
---
gcc/config/arm/arm-builtins.cc | 28 ++++++++++++++--------------
gcc/config/arm/arm-mve-builtins.def | 16 ++++++++--------
2 files changed, 22 insertions(+), 22 deletions(-)
diff --git a/gcc/config/arm/arm-builtins.cc b/gcc/config/arm/arm-builtins.cc
index fca7dcaf565..dd9c5815c45 100644
--- a/gcc/config/arm/arm-builtins.cc
+++ b/gcc/config/arm/arm-builtins.cc
@@ -1580,20 +1580,20 @@ arm_init_simd_builtin_types (void)
TYPE_STRING_FLAG (arm_simd_polyHI_type_node) = false;
}
/* Init all the element types built by the front-end. */
- arm_simd_types[Int8x8_t].eltype = intQI_type_node;
- arm_simd_types[Int8x16_t].eltype = intQI_type_node;
- arm_simd_types[Int16x4_t].eltype = intHI_type_node;
- arm_simd_types[Int16x8_t].eltype = intHI_type_node;
- arm_simd_types[Int32x2_t].eltype = intSI_type_node;
- arm_simd_types[Int32x4_t].eltype = intSI_type_node;
- arm_simd_types[Int64x2_t].eltype = intDI_type_node;
- arm_simd_types[Uint8x8_t].eltype = unsigned_intQI_type_node;
- arm_simd_types[Uint8x16_t].eltype = unsigned_intQI_type_node;
- arm_simd_types[Uint16x4_t].eltype = unsigned_intHI_type_node;
- arm_simd_types[Uint16x8_t].eltype = unsigned_intHI_type_node;
- arm_simd_types[Uint32x2_t].eltype = unsigned_intSI_type_node;
- arm_simd_types[Uint32x4_t].eltype = unsigned_intSI_type_node;
- arm_simd_types[Uint64x2_t].eltype = unsigned_intDI_type_node;
+ arm_simd_types[Int8x8_t].eltype = get_typenode_from_name (INT8_TYPE);
+ arm_simd_types[Int8x16_t].eltype = get_typenode_from_name (INT8_TYPE);
+ arm_simd_types[Int16x4_t].eltype = get_typenode_from_name (INT16_TYPE);
+ arm_simd_types[Int16x8_t].eltype = get_typenode_from_name (INT16_TYPE);
+ arm_simd_types[Int32x2_t].eltype = get_typenode_from_name (INT32_TYPE);
+ arm_simd_types[Int32x4_t].eltype = get_typenode_from_name (INT32_TYPE);
+ arm_simd_types[Int64x2_t].eltype = get_typenode_from_name (INT64_TYPE);
+ arm_simd_types[Uint8x8_t].eltype = get_typenode_from_name (UINT8_TYPE);
+ arm_simd_types[Uint8x16_t].eltype = get_typenode_from_name (UINT8_TYPE);
+ arm_simd_types[Uint16x4_t].eltype = get_typenode_from_name (UINT16_TYPE);
+ arm_simd_types[Uint16x8_t].eltype = get_typenode_from_name (UINT16_TYPE);
+ arm_simd_types[Uint32x2_t].eltype = get_typenode_from_name (UINT32_TYPE);
+ arm_simd_types[Uint32x4_t].eltype = get_typenode_from_name (UINT32_TYPE);
+ arm_simd_types[Uint64x2_t].eltype = get_typenode_from_name (UINT64_TYPE);
/* Note: poly64x2_t is defined in arm_neon.h, to ensure it gets default
mangling. */
diff --git a/gcc/config/arm/arm-mve-builtins.def b/gcc/config/arm/arm-mve-builtins.def
index e2cf1baf370..a901d8231e9 100644
--- a/gcc/config/arm/arm-mve-builtins.def
+++ b/gcc/config/arm/arm-mve-builtins.def
@@ -39,14 +39,14 @@ DEF_MVE_MODE (r, none, none, none)
#define REQUIRES_FLOAT false
DEF_MVE_TYPE (mve_pred16_t, boolean_type_node)
-DEF_MVE_TYPE (uint8x16_t, unsigned_intQI_type_node)
-DEF_MVE_TYPE (uint16x8_t, unsigned_intHI_type_node)
-DEF_MVE_TYPE (uint32x4_t, unsigned_intSI_type_node)
-DEF_MVE_TYPE (uint64x2_t, unsigned_intDI_type_node)
-DEF_MVE_TYPE (int8x16_t, intQI_type_node)
-DEF_MVE_TYPE (int16x8_t, intHI_type_node)
-DEF_MVE_TYPE (int32x4_t, intSI_type_node)
-DEF_MVE_TYPE (int64x2_t, intDI_type_node)
+DEF_MVE_TYPE (uint8x16_t, get_typenode_from_name (UINT8_TYPE))
+DEF_MVE_TYPE (uint16x8_t, get_typenode_from_name (UINT16_TYPE))
+DEF_MVE_TYPE (uint32x4_t, get_typenode_from_name (UINT32_TYPE))
+DEF_MVE_TYPE (uint64x2_t, get_typenode_from_name (UINT64_TYPE))
+DEF_MVE_TYPE (int8x16_t, get_typenode_from_name (INT8_TYPE))
+DEF_MVE_TYPE (int16x8_t, get_typenode_from_name (INT16_TYPE))
+DEF_MVE_TYPE (int32x4_t, get_typenode_from_name (INT32_TYPE))
+DEF_MVE_TYPE (int64x2_t, get_typenode_from_name (INT64_TYPE))
#undef REQUIRES_FLOAT
#define REQUIRES_FLOAT true
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2023-11-20 11:24 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-11-20 11:24 [gcc r14-5617] arm: Fix arm_simd_types and MVE scalar_types Christophe Lyon
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).