diff options
author | Andreas Krebbel <krebbel@linux.vnet.ibm.com> | 2017-10-06 09:18:37 +0000 |
---|---|---|
committer | Andreas Krebbel <krebbel@gcc.gnu.org> | 2017-10-06 09:18:37 +0000 |
commit | 6fcb90c624db95f1b483e0d403e95215d4732bd6 (patch) | |
tree | 220413c5fde8142ea2819958451e6004c3df1d12 /gcc/config | |
parent | 3d28cdc2cdab4fca880e737602c29e08ba01ef76 (diff) | |
download | gcc-6fcb90c624db95f1b483e0d403e95215d4732bd6.zip gcc-6fcb90c624db95f1b483e0d403e95215d4732bd6.tar.gz gcc-6fcb90c624db95f1b483e0d403e95215d4732bd6.tar.bz2 |
PR82317: S/390: Fix vec_min/vec_max builtins for IBM z13.
With IBM z14 a hardware instruction for floating point min and max has
been added while for IBM z13 we emulated min/max for vector double with
compare and select. This testcase makes sure that we fall back to the
emulated variant when compiling for z13.
gcc/ChangeLog:
2017-10-06 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
PR target/82317
* config/s390/s390-builtin-types.def: Regenerate.
* config/s390/s390-builtins.def (s390_vfmaxdb_4, s390_vfmindb_4):
Change flag from B_VXE to B_VX.
(s390_vec_min_dbl): Remove B_VXE flag.
gcc/testsuite/ChangeLog:
2017-10-06 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
PR target/82317
* gcc.target/s390/zvector/pr82317.c: New test.
From-SVN: r253480
Diffstat (limited to 'gcc/config')
-rw-r--r-- | gcc/config/s390/s390-builtin-types.def | 74 | ||||
-rw-r--r-- | gcc/config/s390/s390-builtins.def | 6 |
2 files changed, 40 insertions, 40 deletions
diff --git a/gcc/config/s390/s390-builtin-types.def b/gcc/config/s390/s390-builtin-types.def index b7f3303..b466aa1 100644 --- a/gcc/config/s390/s390-builtin-types.def +++ b/gcc/config/s390/s390-builtin-types.def @@ -54,74 +54,74 @@ s390_builtin_types[T6]) DEF_TYPE (BT_INT, integer_type_node, 0) DEF_TYPE (BT_VOID, void_type_node, 0) -DEF_TYPE (BT_ULONG, long_unsigned_type_node, 0) DEF_TYPE (BT_UINT64, c_uint64_type_node, 0) -DEF_TYPE (BT_INT128, intTI_type_node, 0) DEF_TYPE (BT_UINT, unsigned_type_node, 0) DEF_TYPE (BT_VOIDCONST, void_type_node, 1) -DEF_TYPE (BT_USHORTCONST, short_unsigned_type_node, 1) -DEF_TYPE (BT_SHORTCONST, short_integer_type_node, 1) -DEF_TYPE (BT_UCHARCONST, unsigned_char_type_node, 1) DEF_TYPE (BT_INTCONST, integer_type_node, 1) -DEF_TYPE (BT_SCHARCONST, signed_char_type_node, 1) DEF_TYPE (BT_UCHAR, unsigned_char_type_node, 0) -DEF_TYPE (BT_SHORT, short_integer_type_node, 0) -DEF_TYPE (BT_LONG, long_integer_type_node, 0) -DEF_TYPE (BT_SCHAR, signed_char_type_node, 0) -DEF_TYPE (BT_USHORT, short_unsigned_type_node, 0) -DEF_TYPE (BT_ULONGLONG, long_long_unsigned_type_node, 0) -DEF_TYPE (BT_DBLCONST, double_type_node, 1) +DEF_TYPE (BT_UINTCONST, unsigned_type_node, 1) DEF_TYPE (BT_FLT, float_type_node, 0) -DEF_TYPE (BT_DBL, double_type_node, 0) DEF_TYPE (BT_FLTCONST, float_type_node, 1) -DEF_TYPE (BT_ULONGLONGCONST, long_long_unsigned_type_node, 1) DEF_TYPE (BT_LONGLONG, long_long_integer_type_node, 0) +DEF_TYPE (BT_ULONGLONG, long_long_unsigned_type_node, 0) DEF_TYPE (BT_LONGLONGCONST, long_long_integer_type_node, 1) -DEF_TYPE (BT_UINTCONST, unsigned_type_node, 1) -DEF_VECTOR_TYPE (BT_UV2DI, BT_ULONGLONG, 2) -DEF_VECTOR_TYPE (BT_V2DI, BT_LONGLONG, 2) -DEF_VECTOR_TYPE (BT_V8HI, BT_SHORT, 8) +DEF_TYPE (BT_ULONGLONGCONST, long_long_unsigned_type_node, 1) +DEF_TYPE (BT_DBL, double_type_node, 0) +DEF_TYPE (BT_DBLCONST, double_type_node, 1) +DEF_TYPE (BT_USHORT, short_unsigned_type_node, 0) +DEF_TYPE (BT_SCHAR, signed_char_type_node, 0) +DEF_TYPE (BT_LONG, long_integer_type_node, 0) +DEF_TYPE (BT_SHORT, short_integer_type_node, 0) +DEF_TYPE (BT_SCHARCONST, signed_char_type_node, 1) +DEF_TYPE (BT_UCHARCONST, unsigned_char_type_node, 1) +DEF_TYPE (BT_SHORTCONST, short_integer_type_node, 1) +DEF_TYPE (BT_USHORTCONST, short_unsigned_type_node, 1) +DEF_TYPE (BT_INT128, intTI_type_node, 0) +DEF_TYPE (BT_ULONG, long_unsigned_type_node, 0) DEF_VECTOR_TYPE (BT_V4SI, BT_INT, 4) DEF_VECTOR_TYPE (BT_UV4SI, BT_UINT, 4) -DEF_VECTOR_TYPE (BT_V16QI, BT_SCHAR, 16) -DEF_VECTOR_TYPE (BT_UV8HI, BT_USHORT, 8) DEF_VECTOR_TYPE (BT_V4SF, BT_FLT, 4) +DEF_VECTOR_TYPE (BT_V2DI, BT_LONGLONG, 2) +DEF_VECTOR_TYPE (BT_UV2DI, BT_ULONGLONG, 2) DEF_VECTOR_TYPE (BT_V2DF, BT_DBL, 2) DEF_VECTOR_TYPE (BT_UV16QI, BT_UCHAR, 16) -DEF_POINTER_TYPE (BT_USHORTPTR, BT_USHORT) -DEF_POINTER_TYPE (BT_UINTCONSTPTR, BT_UINTCONST) +DEF_VECTOR_TYPE (BT_UV8HI, BT_USHORT, 8) +DEF_VECTOR_TYPE (BT_V16QI, BT_SCHAR, 16) +DEF_VECTOR_TYPE (BT_V8HI, BT_SHORT, 8) DEF_POINTER_TYPE (BT_VOIDPTR, BT_VOID) -DEF_POINTER_TYPE (BT_ULONGLONGCONSTPTR, BT_ULONGLONGCONST) DEF_POINTER_TYPE (BT_UINT64PTR, BT_UINT64) +DEF_POINTER_TYPE (BT_VOIDCONSTPTR, BT_VOIDCONST) +DEF_POINTER_TYPE (BT_INTCONSTPTR, BT_INTCONST) +DEF_POINTER_TYPE (BT_UINTCONSTPTR, BT_UINTCONST) DEF_POINTER_TYPE (BT_FLTCONSTPTR, BT_FLTCONST) -DEF_POINTER_TYPE (BT_USHORTCONSTPTR, BT_USHORTCONST) +DEF_POINTER_TYPE (BT_LONGLONGCONSTPTR, BT_LONGLONGCONST) +DEF_POINTER_TYPE (BT_ULONGLONGCONSTPTR, BT_ULONGLONGCONST) +DEF_POINTER_TYPE (BT_DBLCONSTPTR, BT_DBLCONST) DEF_POINTER_TYPE (BT_SCHARPTR, BT_SCHAR) DEF_POINTER_TYPE (BT_UCHARPTR, BT_UCHAR) -DEF_POINTER_TYPE (BT_VOIDCONSTPTR, BT_VOIDCONST) -DEF_POINTER_TYPE (BT_LONGLONGCONSTPTR, BT_LONGLONGCONST) DEF_POINTER_TYPE (BT_SHORTPTR, BT_SHORT) -DEF_POINTER_TYPE (BT_DBLCONSTPTR, BT_DBLCONST) +DEF_POINTER_TYPE (BT_USHORTPTR, BT_USHORT) DEF_POINTER_TYPE (BT_INTPTR, BT_INT) DEF_POINTER_TYPE (BT_UINTPTR, BT_UINT) DEF_POINTER_TYPE (BT_LONGLONGPTR, BT_LONGLONG) DEF_POINTER_TYPE (BT_ULONGLONGPTR, BT_ULONGLONG) -DEF_POINTER_TYPE (BT_INTCONSTPTR, BT_INTCONST) +DEF_POINTER_TYPE (BT_FLTPTR, BT_FLT) DEF_POINTER_TYPE (BT_DBLPTR, BT_DBL) -DEF_POINTER_TYPE (BT_SHORTCONSTPTR, BT_SHORTCONST) -DEF_POINTER_TYPE (BT_UCHARCONSTPTR, BT_UCHARCONST) DEF_POINTER_TYPE (BT_SCHARCONSTPTR, BT_SCHARCONST) -DEF_POINTER_TYPE (BT_FLTPTR, BT_FLT) -DEF_DISTINCT_TYPE (BT_BCHAR, BT_UCHAR) -DEF_DISTINCT_TYPE (BT_BSHORT, BT_USHORT) +DEF_POINTER_TYPE (BT_UCHARCONSTPTR, BT_UCHARCONST) +DEF_POINTER_TYPE (BT_SHORTCONSTPTR, BT_SHORTCONST) +DEF_POINTER_TYPE (BT_USHORTCONSTPTR, BT_USHORTCONST) DEF_DISTINCT_TYPE (BT_BINT, BT_UINT) DEF_DISTINCT_TYPE (BT_BLONGLONG, BT_ULONGLONG) -DEF_OPAQUE_VECTOR_TYPE (BT_BV8HI, BT_BSHORT, 8) +DEF_DISTINCT_TYPE (BT_BCHAR, BT_UCHAR) +DEF_DISTINCT_TYPE (BT_BSHORT, BT_USHORT) DEF_OPAQUE_VECTOR_TYPE (BT_OV4SI, BT_INT, 4) -DEF_OPAQUE_VECTOR_TYPE (BT_BV16QI, BT_BCHAR, 16) -DEF_OPAQUE_VECTOR_TYPE (BT_BV2DI, BT_BLONGLONG, 2) -DEF_OPAQUE_VECTOR_TYPE (BT_OV2DI, BT_LONGLONG, 2) DEF_OPAQUE_VECTOR_TYPE (BT_OUV4SI, BT_UINT, 4) DEF_OPAQUE_VECTOR_TYPE (BT_BV4SI, BT_BINT, 4) +DEF_OPAQUE_VECTOR_TYPE (BT_BV2DI, BT_BLONGLONG, 2) +DEF_OPAQUE_VECTOR_TYPE (BT_BV16QI, BT_BCHAR, 16) +DEF_OPAQUE_VECTOR_TYPE (BT_BV8HI, BT_BSHORT, 8) +DEF_OPAQUE_VECTOR_TYPE (BT_OV2DI, BT_LONGLONG, 2) DEF_FN_TYPE_0 (BT_FN_INT, BT_INT) DEF_FN_TYPE_0 (BT_FN_UINT, BT_UINT) DEF_FN_TYPE_1 (BT_FN_INT_INT, BT_INT, BT_INT) diff --git a/gcc/config/s390/s390-builtins.def b/gcc/config/s390/s390-builtins.def index 3f7bae7..7007e38 100644 --- a/gcc/config/s390/s390-builtins.def +++ b/gcc/config/s390/s390-builtins.def @@ -1701,7 +1701,7 @@ B_DEF (s390_vmxlg, umaxv2di3, 0, B_DEF (s390_vfmaxsb, vfmaxv4sf, 0, B_VXE, O3_U4, BT_FN_V4SF_V4SF_V4SF_INT) B_DEF (s390_vfmaxdb, vfmaxv2df, 0, B_VXE, O3_U4, BT_FN_V2DF_V2DF_V2DF_INT) B_DEF (s390_vfmaxsb_4, smaxv4sf3, 0, B_INT | B_VXE, 0, BT_FN_V4SF_V4SF_V4SF) -B_DEF (s390_vfmaxdb_4, smaxv2df3, 0, B_INT | B_VXE, 0, BT_FN_V2DF_V2DF_V2DF) +B_DEF (s390_vfmaxdb_4, smaxv2df3, 0, B_INT | B_VX, 0, BT_FN_V2DF_V2DF_V2DF) OB_DEF (s390_vec_min, s390_vec_min_s8_a, s390_vec_min_dbl, B_VX, BT_FN_OV4SI_OV4SI_OV4SI) OB_DEF_VAR (s390_vec_min_s8_a, s390_vmnb, B_DEP, 0, BT_OV_V16QI_BV16QI_V16QI) @@ -1729,7 +1729,7 @@ OB_DEF_VAR (s390_vec_min_u64_a, s390_vmnlg, B_DEP, OB_DEF_VAR (s390_vec_min_u64_b, s390_vmnlg, 0, 0, BT_OV_UV2DI_UV2DI_UV2DI) OB_DEF_VAR (s390_vec_min_u64_c, s390_vmnlg, B_DEP, 0, BT_OV_UV2DI_UV2DI_BV2DI) OB_DEF_VAR (s390_vec_min_flt, s390_vfminsb_4, B_VXE, 0, BT_OV_V4SF_V4SF_V4SF) -OB_DEF_VAR (s390_vec_min_dbl, s390_vfmindb_4, B_VXE, 0, BT_OV_V2DF_V2DF_V2DF) +OB_DEF_VAR (s390_vec_min_dbl, s390_vfmindb_4, 0, 0, BT_OV_V2DF_V2DF_V2DF) B_DEF (s390_vmnb, sminv16qi3, 0, B_VX, 0, BT_FN_V16QI_BV16QI_V16QI) B_DEF (s390_vmnlb, uminv16qi3, 0, B_VX, 0, BT_FN_UV16QI_UV16QI_UV16QI) @@ -1742,7 +1742,7 @@ B_DEF (s390_vmnlg, uminv2di3, 0, B_DEF (s390_vfminsb, vfminv4sf, 0, B_VXE, O3_U4, BT_FN_V4SF_V4SF_V4SF_INT) B_DEF (s390_vfmindb, vfminv2df, 0, B_VXE, O3_U4, BT_FN_V2DF_V2DF_V2DF_INT) B_DEF (s390_vfminsb_4, sminv4sf3, 0, B_INT | B_VXE, 0, BT_FN_V4SF_V4SF_V4SF) /* vfminsb */ -B_DEF (s390_vfmindb_4, sminv2df3, 0, B_INT | B_VXE, 0, BT_FN_V2DF_V2DF_V2DF) /* vfmindb */ +B_DEF (s390_vfmindb_4, sminv2df3, 0, B_INT | B_VX, 0, BT_FN_V2DF_V2DF_V2DF) /* vfmindb */ OB_DEF (s390_vec_mladd, s390_vec_mladd_u8, s390_vec_mladd_s32_c,B_VX, BT_FN_OV4SI_OV4SI_OV4SI_OV4SI) OB_DEF_VAR (s390_vec_mladd_u8, s390_vmalb, 0, 0, BT_OV_UV16QI_UV16QI_UV16QI_UV16QI) |