diff options
author | Christophe Lyon <christophe.lyon@linaro.org> | 2023-08-14 13:08:18 +0000 |
---|---|---|
committer | Christophe Lyon <christophe.lyon@linaro.org> | 2023-08-28 08:59:51 +0000 |
commit | 455d608f878e800399f400b758f277af7aac1842 (patch) | |
tree | cea1157024c78be9da9982a850a57d388dd87008 | |
parent | 9bae37ec8dc32027dedf9a32bf15754ebad6da38 (diff) | |
download | gcc-455d608f878e800399f400b758f277af7aac1842.zip gcc-455d608f878e800399f400b758f277af7aac1842.tar.gz gcc-455d608f878e800399f400b758f277af7aac1842.tar.bz2 |
arm: [MVE intrinsics] add support for U and p formats in parse_element_type
Introduce these two format specifiers to define the shape of
vmull[bt]q_poly intrinsics.
'U' is used to define a double-width unsigned
'p' is used to define an element of 'poly' type.
2023-08-14 Christophe Lyon <christophe.lyon@linaro.org>
gcc/
* config/arm/arm-mve-builtins-shapes.cc (parse_element_type): Add
support for 'U' and 'p' format specifiers.
-rw-r--r-- | gcc/config/arm/arm-mve-builtins-shapes.cc | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/gcc/config/arm/arm-mve-builtins-shapes.cc b/gcc/config/arm/arm-mve-builtins-shapes.cc index c8eb335..761da4d 100644 --- a/gcc/config/arm/arm-mve-builtins-shapes.cc +++ b/gcc/config/arm/arm-mve-builtins-shapes.cc @@ -61,10 +61,12 @@ apply_predication (const function_instance &instance, tree return_type, [01] - the element type in type suffix 0 or 1 of INSTANCE. h<elt> - a half-sized version of <elt> + p<elt> - a poly type with the same width as <elt> s<bits> - a signed type with the given number of bits s[01] - a signed type with the same width as type suffix 0 or 1 u<bits> - an unsigned type with the given number of bits u[01] - an unsigned type with the same width as type suffix 0 or 1 + U<elt> - an unsigned type with the double width as <elt> w<elt> - a double-sized version of <elt> x<bits> - a type with the given number of bits and same signedness as the next argument. @@ -102,6 +104,20 @@ parse_element_type (const function_instance &instance, const char *&format) type_suffixes[suffix].element_bits * 2); } + if (ch == 'U') + { + type_suffix_index suffix = parse_element_type (instance, format); + return find_type_suffix (TYPE_unsigned, + type_suffixes[suffix].element_bits * 2); + } + + if (ch == 'p') + { + type_suffix_index suffix = parse_element_type (instance, format); + return find_type_suffix (TYPE_poly, + type_suffixes[suffix].element_bits); + } + if (ch == 'x') { const char *next = format; |