]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
re PR target/63335 (GCC:failures for vector double on calls to bif vec_[all|any]_...
authorBill Schmidt <wschmidt@linux.vnet.ibm.com>
Thu, 25 Sep 2014 15:15:06 +0000 (15:15 +0000)
committerWilliam Schmidt <wschmidt@gcc.gnu.org>
Thu, 25 Sep 2014 15:15:06 +0000 (15:15 +0000)
[gcc]

2014-09-25  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>

PR target/63335
* config/rs6000/rs6000-c.c (altivec_build_resolved_builtin):
Exclude VSX_BUILTIN_XVCMPGEDP_P from special handling.

[gcc/testsuite]

2014-09-25  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>

PR target/63335
* gcc.target/powerpc/pr63335.c: New test.

From-SVN: r215604

gcc/ChangeLog
gcc/config/rs6000/rs6000-c.c
gcc/testsuite/ChangeLog
gcc/testsuite/gcc.target/powerpc/pr63335.c [new file with mode: 0644]

index c33e92c9cdf90ddf4facf0204b81398bedf29735..e2b552d86334c043f3d8945794562c34018a62d7 100644 (file)
@@ -1,3 +1,12 @@
+2014-09-25  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
+
+       Backport from mainline r215559
+       2014-09-25  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
+
+       PR target/63335
+       * config/rs6000/rs6000-c.c (altivec_build_resolved_builtin):
+       Exclude VSX_BUILTIN_XVCMPGEDP_P from special handling.
+
 2014-09-25  Jakub Jelinek  <jakub@redhat.com>
 
        PR tree-optimization/63341
index 9cb6387b9ed29c6cac963e019ef9d684c5e9fd82..08ea5c585fd230cb77b748179c12082fc030da4e 100644 (file)
@@ -4126,7 +4126,8 @@ altivec_build_resolved_builtin (tree *args, int n,
      argument) is reversed.  Patch the arguments here before building
      the resolved CALL_EXPR.  */
   if (desc->code == ALTIVEC_BUILTIN_VEC_VCMPGE_P
-      && desc->overloaded_code != ALTIVEC_BUILTIN_VCMPGEFP_P)
+      && desc->overloaded_code != ALTIVEC_BUILTIN_VCMPGEFP_P
+      && desc->overloaded_code != VSX_BUILTIN_XVCMPGEDP_P)
     {
       tree t;
       t = args[2], args[2] = args[1], args[1] = t;
index 7b517126fb2d1781a92376ba615b7206200508f3..ba5225c0bea27e61f782ebc84af32d86fb801abc 100644 (file)
@@ -1,3 +1,11 @@
+2014-09-25  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
+
+       Backport from mainline r215559
+       2014-09-25  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
+
+       PR target/63335
+       * gcc.target/powerpc/pr63335.c: New test.
+
 2014-09-25  Jakub Jelinek  <jakub@redhat.com>
 
        PR tree-optimization/63341
diff --git a/gcc/testsuite/gcc.target/powerpc/pr63335.c b/gcc/testsuite/gcc.target/powerpc/pr63335.c
new file mode 100644 (file)
index 0000000..931a8b6
--- /dev/null
@@ -0,0 +1,30 @@
+/* { dg-do run { target { powerpc64*-*-* } } } */
+/* { dg-require-effective-target powerpc_vsx_ok } */
+/* { dg-options "-mvsx" } */
+
+#include <altivec.h>
+
+void abort (void);
+
+vector double vec = (vector double) {99.0, 99.0};
+
+int main() {
+
+  int actual = vec_all_nge(vec, vec);
+  if ( actual != 0)
+    abort();
+
+  actual = vec_all_nle(vec, vec);
+  if ( actual != 0)
+    abort();
+
+  actual = vec_any_nge(vec, vec);
+  if ( actual != 0)
+    abort();
+
+  actual = vec_any_nle(vec, vec);
+  if ( actual != 0)
+    abort();
+
+  return 0;
+}