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.l...@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 | 16 ++++++++++++++++
 1 file changed, 16 insertions(+)

diff --git a/gcc/config/arm/arm-mve-builtins-shapes.cc 
b/gcc/config/arm/arm-mve-builtins-shapes.cc
index c8eb3351ef2..761da4d8ece 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;
-- 
2.34.1

Reply via email to