Hi!

Given that the s390 backend defines pretty much the same target hook
as rs6000, I believe it suffers (at least when using -mvx?) the same
problem as rs6000, though admittedly this is so far completely
untested.

Ok for trunk if it passes bootstrap/regtest there?

2023-11-29  Jakub Jelinek  <ja...@redhat.com>

        PR target/112725
        * config/s390/s390.cc (s390_invalid_arg_for_unprototyped_fn): Return
        NULL for __builtin_classify_type calls with vector arguments.

--- gcc/config/s390/s390.cc.jj  2023-11-27 17:34:25.684287136 +0100
+++ gcc/config/s390/s390.cc     2023-11-29 09:41:08.569491077 +0100
@@ -12650,7 +12650,8 @@ s390_invalid_arg_for_unprototyped_fn (co
           && VECTOR_TYPE_P (TREE_TYPE (val))
           && (funcdecl == NULL_TREE
               || (TREE_CODE (funcdecl) == FUNCTION_DECL
-                  && DECL_BUILT_IN_CLASS (funcdecl) != BUILT_IN_MD)))
+                  && DECL_BUILT_IN_CLASS (funcdecl) != BUILT_IN_MD
+                  && !fndecl_built_in_p (funcdecl, BUILT_IN_CLASSIFY_TYPE))))
          ? N_("vector argument passed to unprototyped function")
          : NULL);
 }

        Jakub

Reply via email to