From: Bill Schmidt Date: Thu, 25 Sep 2014 14:06:09 +0000 (+0000) Subject: re PR target/63335 (GCC:failures for vector double on calls to bif vec_[all|any]_... X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=eb1f7a0a3d3f81efe4f781ec6ca83137477255fd;p=gcc.git re PR target/63335 (GCC:failures for vector double on calls to bif vec_[all|any]_[nge|nle]) [gcc] 2014-09-25 Bill Schmidt 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 PR target/63335 * gcc.target/powerpc/pr63335.c: New test. From-SVN: r215599 --- diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 06c4f0a4519..0b5fb31eca9 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,9 @@ +2014-09-25 Bill Schmidt + + PR target/63335 + * config/rs6000/rs6000-c.c (altivec_build_resolved_builtin): + Exclude VSX_BUILTIN_XVCMPGEDP_P from special handling. + 2014-09-25 Alexander Ivchenko Maxim Kuznetsov Anna Tikhonova diff --git a/gcc/config/rs6000/rs6000-c.c b/gcc/config/rs6000/rs6000-c.c index 470efc5a140..9c16a886d77 100644 --- a/gcc/config/rs6000/rs6000-c.c +++ b/gcc/config/rs6000/rs6000-c.c @@ -4267,7 +4267,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; diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 953a5b2a3e5..fe01c672772 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,8 @@ +2014-09-25 Bill Schmidt + + PR target/63335 + * gcc.target/powerpc/pr63335.c: New test. + 2014-09-25 Marek Polacek PR c++/61945 diff --git a/gcc/testsuite/gcc.target/powerpc/pr63335.c b/gcc/testsuite/gcc.target/powerpc/pr63335.c new file mode 100644 index 00000000000..931a8b6e99e --- /dev/null +++ b/gcc/testsuite/gcc.target/powerpc/pr63335.c @@ -0,0 +1,30 @@ +/* { dg-do run { target { powerpc64*-*-* } } } */ +/* { dg-require-effective-target powerpc_vsx_ok } */ +/* { dg-options "-mvsx" } */ + +#include + +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; +}