From: Andreas Krebbel Date: Mon, 9 Oct 2017 12:06:11 +0000 (+0000) Subject: S/390: PR82465: Fix vec_sqrt builtin flags X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=3141e768ee22a6dda9a5aaf6201191bdbc46a6e0;p=gcc.git S/390: PR82465: Fix vec_sqrt builtin flags The vector double variant is available with z13. A wrong flag in the s390-builtins.def file triggered an error when compiling for z13. gcc/testsuite/ChangeLog: 2017-10-09 Andreas Krebbel PR target/82465 * gcc.target/s390/zvector/pr82465.c: New test. gcc/ChangeLog: 2017-10-09 Andreas Krebbel PR target/82465 * config/s390/s390-builtins.def (vec_sqrt): Fix builtin flags. From-SVN: r253542 --- diff --git a/gcc/ChangeLog b/gcc/ChangeLog index f8b63ca1b1a..db94724f27c 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,8 @@ +2017-10-09 Andreas Krebbel + + PR target/82465 + * config/s390/s390-builtins.def (vec_sqrt): Fix builtin flags. + 2017-10-09 Jakub Jelinek PR target/82464 diff --git a/gcc/config/s390/s390-builtins.def b/gcc/config/s390/s390-builtins.def index cc87a81555c..f0524661aa5 100644 --- a/gcc/config/s390/s390-builtins.def +++ b/gcc/config/s390/s390-builtins.def @@ -2843,9 +2843,9 @@ OB_DEF (s390_vec_nabs, s390_vec_nabs_flt, s390_vec_nabs_dbl, OB_DEF_VAR (s390_vec_nabs_flt, s390_vflnsb, 0, 0, BT_OV_V4SF_V4SF) OB_DEF_VAR (s390_vec_nabs_dbl, s390_vflndb, B_VX, 0, BT_OV_V2DF_V2DF) -OB_DEF (s390_vec_sqrt, s390_vec_sqrt_flt, s390_vec_sqrt_dbl, B_VXE, BT_FN_OV4SI_OV4SI) -OB_DEF_VAR (s390_vec_sqrt_flt, s390_vfsqsb, 0, 0, BT_OV_V4SF_V4SF) -OB_DEF_VAR (s390_vec_sqrt_dbl, s390_vfsqdb, B_VX, 0, BT_OV_V2DF_V2DF) +OB_DEF (s390_vec_sqrt, s390_vec_sqrt_flt, s390_vec_sqrt_dbl, B_VX, BT_FN_OV4SI_OV4SI) +OB_DEF_VAR (s390_vec_sqrt_flt, s390_vfsqsb, B_VXE, 0, BT_OV_V4SF_V4SF) +OB_DEF_VAR (s390_vec_sqrt_dbl, s390_vfsqdb, 0, 0, BT_OV_V2DF_V2DF) /* Test data class with boolean result *AND* cc mode. */ diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 2876285d2dd..0c1ba68d6c0 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,8 @@ +2017-10-09 Andreas Krebbel + + PR target/82465 + * gcc.target/s390/zvector/pr82465.c: New test. + 2017-10-09 Wilco Dijkstra * gcc.dg/tree-ssa/ssa-dse-26.c (dg-options): Add -fno-short-enums. diff --git a/gcc/testsuite/gcc.target/s390/zvector/pr82465.c b/gcc/testsuite/gcc.target/s390/zvector/pr82465.c new file mode 100644 index 00000000000..ae8f8ad93ff --- /dev/null +++ b/gcc/testsuite/gcc.target/s390/zvector/pr82465.c @@ -0,0 +1,16 @@ +/* { dg-do compile { target { s390*-*-* } } } */ +/* { dg-options "-march=z13 -mzarch -mzvector" } */ + +/* The vector double variant is available with z13. A wrong flag in + the s390-builtins.def file triggered an error when compiling for + z13. */ + +typedef __vector double v2df; + +#include + +v2df +foo (v2df a) +{ + return vec_sqrt(a); +}