rs6000: Fix __builtin_altivec_mask_for_load to use correct type
authorBill Seurer, 507-253-3502, seurer@us.ibm.com <(no_default)>
Thu, 9 Jul 2020 21:41:38 +0000 (16:41 -0500)
committerBill Seurer, 507-253-3502, seurer@us.ibm.com <(no_default)>
Fri, 10 Jul 2020 13:14:06 +0000 (08:14 -0500)
gcc/ChangeLog:

PR target/95581
* config/rs6000/rs6000-call.c: Add new type v16qi_ftype_pcvoid.
(altivec_init_builtins) Change __builtin_altivec_mask_for_load to use
v16qi_ftype_pcvoid with correct number of parameters.

gcc/config/rs6000/rs6000-call.c

index 4e840e260a6d5dde1a5da2a88db6d64ec5724c11..213673dfe303df9aec4950bab5091313f1a22810 100644 (file)
@@ -12843,6 +12843,10 @@ altivec_init_builtins (void)
     = build_function_type_list (opaque_V4SI_type_node,
                                long_integer_type_node, pcvoid_type_node,
                                NULL_TREE);
+  tree v16qi_ftype_pcvoid
+    = build_function_type_list (V16QI_type_node,
+                               pcvoid_type_node,
+                               NULL_TREE);
   tree v16qi_ftype_long_pcvoid
     = build_function_type_list (V16QI_type_node,
                                long_integer_type_node, pcvoid_type_node,
@@ -13245,7 +13249,7 @@ altivec_init_builtins (void)
      targetm.vectorize.builtin_mask_for_load.  */
 
   decl = add_builtin_function ("__builtin_altivec_mask_for_load",
-                              v16qi_ftype_long_pcvoid,
+                              v16qi_ftype_pcvoid,
                               ALTIVEC_BUILTIN_MASK_FOR_LOAD,
                               BUILT_IN_MD, NULL, NULL_TREE);
   TREE_READONLY (decl) = 1;