]> gcc.gnu.org Git - gcc.git/commitdiff
rs6000: Fix typo on vec_vsubcuq in rs6000-overload.def [PR108396]
authorKewen Lin <linkw@linux.ibm.com>
Wed, 18 Jan 2023 08:34:25 +0000 (02:34 -0600)
committerKewen Lin <linkw@linux.ibm.com>
Mon, 13 Feb 2023 02:00:53 +0000 (20:00 -0600)
As Andrew pointed out in PR108396, there is one typo in
rs6000-overload.def on built-in function vec_vsubcuq:

  [VEC_VSUBCUQ, vec_vsubcuqP, __builtin_vec_vsubcuq]

"vec_vsubcuqP" should be "vec_vsubcuq", this typo caused
us to define vec_vsubcuqP in rs6000-vecdefines.h instead
of vec_vsubcuq, so that compiler is not able to realize
the built-in function name vec_vsubcuq any more.

Co-authored-By: Andrew Pinski <apinski@marvell.com>
PR target/108396

gcc/ChangeLog:

* config/rs6000/rs6000-overload.def (VEC_VSUBCUQ): Fix typo
vec_vsubcuqP with vec_vsubcuq.

gcc/testsuite/ChangeLog:

* gcc.target/powerpc/pr108396.c: New test.

(cherry picked from commit aaf29ae6cdbaad58b709a77784375d15138174b3)

gcc/config/rs6000/rs6000-overload.def
gcc/testsuite/gcc.target/powerpc/pr108396.c [new file with mode: 0644]

index 44e2945aaa0e53c15c45fe565a82fc142a97358d..9135b8d69666db3f5f1f478114803ae97b6e9566 100644 (file)
   unsigned int __builtin_vec_scalar_test_data_class_sp (float, const int);
     VSTDCSP  VSTDCSP_DEPR1
 
-[VEC_VSUBCUQ, vec_vsubcuqP, __builtin_vec_vsubcuq]
+[VEC_VSUBCUQ, vec_vsubcuq, __builtin_vec_vsubcuq]
   vsq __builtin_vec_vsubcuq (vsq, vsq);
     VSUBCUQ  VSUBCUQ_DEPR1
   vuq __builtin_vec_vsubcuq (vuq, vuq);
diff --git a/gcc/testsuite/gcc.target/powerpc/pr108396.c b/gcc/testsuite/gcc.target/powerpc/pr108396.c
new file mode 100644 (file)
index 0000000..a783f08
--- /dev/null
@@ -0,0 +1,14 @@
+/* { dg-require-effective-target powerpc_p8vector_ok } */
+/* { dg-require-effective-target int128 } */
+/* { dg-options "-mdejagnu-cpu=power8" } */
+
+/* Verify there is no error message.  */
+
+#include <altivec.h>
+
+vector unsigned __int128
+vsubcuq (vector unsigned __int128 a, vector unsigned __int128 b)
+{
+  return vec_vsubcuq (a, b);
+}
+
This page took 0.083224 seconds and 5 git commands to generate.