]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
arm: [MVE intrinsics] add support for U and p formats in parse_element_type
authorChristophe Lyon <christophe.lyon@linaro.org>
Mon, 14 Aug 2023 13:08:18 +0000 (13:08 +0000)
committerChristophe Lyon <christophe.lyon@linaro.org>
Mon, 28 Aug 2023 08:59:51 +0000 (08:59 +0000)
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.

gcc/config/arm/arm-mve-builtins-shapes.cc

index c8eb3351ef2f537acc52ac55f8ab74e29e38b11b..761da4d8ecec5f288d81f75a2e4e31f53caead71 100644 (file)
@@ -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;