From: Christophe Lyon Date: Mon, 14 Aug 2023 13:08:18 +0000 (+0000) Subject: arm: [MVE intrinsics] add support for U and p formats in parse_element_type X-Git-Tag: basepoints/gcc-15~6619 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=455d608f878e800399f400b758f277af7aac1842;p=thirdparty%2Fgcc.git 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 gcc/ * config/arm/arm-mve-builtins-shapes.cc (parse_element_type): Add support for 'U' and 'p' format specifiers. --- diff --git a/gcc/config/arm/arm-mve-builtins-shapes.cc b/gcc/config/arm/arm-mve-builtins-shapes.cc index c8eb3351ef2f..761da4d8ecec 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 - a half-sized version of + p - a poly type with the same width as s - 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 - 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 - an unsigned type with the double width as w - a double-sized version of x - 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;