From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 1005) id D3D233857B8A; Tue, 2 Aug 2022 00:34:27 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org D3D233857B8A Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: Michael Meissner To: gcc-cvs@gcc.gnu.org Subject: [gcc(refs/users/meissner/heads/work096)] Add IEEE 128-bit overload comparison built-in functions. X-Act-Checkin: gcc X-Git-Author: Michael Meissner X-Git-Refname: refs/users/meissner/heads/work096 X-Git-Oldrev: 4be82f7fc943d0b81763b41201eb8db418edfb69 X-Git-Newrev: ebfe2f4077886e8cdb18b4a8bc3d4c8fbee755cb Message-Id: <20220802003427.D3D233857B8A@sourceware.org> Date: Tue, 2 Aug 2022 00:34:27 +0000 (GMT) X-BeenThere: gcc-cvs@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-cvs mailing list List-Unsubscribe: , List-Archive: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 02 Aug 2022 00:34:27 -0000 https://gcc.gnu.org/g:ebfe2f4077886e8cdb18b4a8bc3d4c8fbee755cb commit ebfe2f4077886e8cdb18b4a8bc3d4c8fbee755cb Author: Michael Meissner Date: Mon Aug 1 19:22:01 2022 -0400 Add IEEE 128-bit overload comparison built-in functions. This patch adds support for overloading the IEEE 128-bit comparison built-in functions bewteeen KFmode and TFmode arguments. 2022-08-01 Michael Meissner gcc/ * config/rs6000/rs6000-builtins.def (__builtin_vsx_scalar_cmp_exp_qp_eq_kf): Rename KFmode comparison built-in functions to have a KF suffix to allow overloading. (__builtin_vsx_scalar_cmp_exp_qp_gt_kf): Likewise. (__builtin_vsx_scalar_cmp_exp_qp_lt_kf): Likewise. (__builtin_vsx_scalar_cmp_exp_qp_unordered_kf): Likewise. (__builtin_vsx_scalar_cmp_exp_qp_eq_tf): Add TFmode comparison built-in functions. (__builtin_vsx_scalar_cmp_exp_qp_gt_tf): Likewise. (__builtin_vsx_scalar_cmp_exp_qp_lt_tf): Likewise. (__builtin_vsx_scalar_cmp_exp_qp_unordered_tf): Likewise. * config/rs6000/rs6000-overload.def (__builtin_vec_scalar_cmp_exp_eq): Add TFmode overloaded functions. (__builtin_vec_scalar_cmp_exp_gt): Likewise. (__builtin_vec_scalar_cmp_exp_lt): Likewise. (__builtin_vec_scalar_cmp_exp_unordered): Likewise. Diff: --- gcc/config/rs6000/rs6000-builtins.def | 32 ++++++++++++++++++++++++-------- gcc/config/rs6000/rs6000-overload.def | 16 ++++++++++++---- 2 files changed, 36 insertions(+), 12 deletions(-) diff --git a/gcc/config/rs6000/rs6000-builtins.def b/gcc/config/rs6000/rs6000-builtins.def index d72ff8cb7fe..23fc4a5f108 100644 --- a/gcc/config/rs6000/rs6000-builtins.def +++ b/gcc/config/rs6000/rs6000-builtins.def @@ -2880,18 +2880,18 @@ fpmath _Float128 __builtin_mulf128_round_to_odd_kf (_Float128, _Float128); MULF128_ODD_KF mulkf3_odd {} - const signed int __builtin_vsx_scalar_cmp_exp_qp_eq (_Float128, _Float128); - VSCEQPEQ xscmpexpqp_eq_kf {} + const signed int __builtin_vsx_scalar_cmp_exp_qp_eq_kf (_Float128, _Float128); + VSCEQPEQ_KF xscmpexpqp_eq_kf {} - const signed int __builtin_vsx_scalar_cmp_exp_qp_gt (_Float128, _Float128); - VSCEQPGT xscmpexpqp_gt_kf {} + const signed int __builtin_vsx_scalar_cmp_exp_qp_gt_kf (_Float128, _Float128); + VSCEQPGT_KF xscmpexpqp_gt_kf {} - const signed int __builtin_vsx_scalar_cmp_exp_qp_lt (_Float128, _Float128); - VSCEQPLT xscmpexpqp_lt_kf {} + const signed int __builtin_vsx_scalar_cmp_exp_qp_lt_kf (_Float128, _Float128); + VSCEQPLT_KF xscmpexpqp_lt_kf {} const signed int \ - __builtin_vsx_scalar_cmp_exp_qp_unordered (_Float128, _Float128); - VSCEQPUO xscmpexpqp_unordered_kf {} + __builtin_vsx_scalar_cmp_exp_qp_unordered_kf (_Float128, _Float128); + VSCEQPUO_KF xscmpexpqp_unordered_kf {} fpmath _Float128 __builtin_sqrtf128_round_to_odd_kf (_Float128); SQRTF128_ODD_KF sqrtkf2_odd {} @@ -2942,6 +2942,22 @@ long double); MULF128_ODD_TF multf3_odd {ieeeld} + const signed int __builtin_vsx_scalar_cmp_exp_qp_eq_tf (long double, \ + long double); + VSCEQPEQ_TF xscmpexpqp_eq_tf {ieeeld} + + const signed int __builtin_vsx_scalar_cmp_exp_qp_gt_tf (long double, \ + long double); + VSCEQPGT_TF xscmpexpqp_gt_kf {ieeeld} + + const signed int __builtin_vsx_scalar_cmp_exp_qp_lt_tf (long double, \ + long double); + VSCEQPLT_TF xscmpexpqp_lt_tf {ieeeld} + + const signed int \ + __builtin_vsx_scalar_cmp_exp_qp_unordered_tf (long double, long double); + VSCEQPUO_TF xscmpexpqp_unordered_tf {ieeeld} + fpmath long double __builtin_sqrtf128_round_to_odd_tf (long double); SQRTF128_ODD_TF sqrttf2_odd {ieeeld} diff --git a/gcc/config/rs6000/rs6000-overload.def b/gcc/config/rs6000/rs6000-overload.def index f406a16a882..511a3821d5b 100644 --- a/gcc/config/rs6000/rs6000-overload.def +++ b/gcc/config/rs6000/rs6000-overload.def @@ -4474,25 +4474,33 @@ signed int __builtin_vec_scalar_cmp_exp_eq (double, double); VSCEDPEQ signed int __builtin_vec_scalar_cmp_exp_eq (_Float128, _Float128); - VSCEQPEQ + VSCEQPEQ_KF + signed int __builtin_vec_scalar_cmp_exp_eq (long double, long double); + VSCEQPEQ_TF [VEC_VSCEGT, scalar_cmp_exp_gt, __builtin_vec_scalar_cmp_exp_gt] signed int __builtin_vec_scalar_cmp_exp_gt (double, double); VSCEDPGT signed int __builtin_vec_scalar_cmp_exp_gt (_Float128, _Float128); - VSCEQPGT + VSCEQPGT_KF + signed int __builtin_vec_scalar_cmp_exp_gt (long double, long double); + VSCEQPGT_TF [VEC_VSCELT, scalar_cmp_exp_lt, __builtin_vec_scalar_cmp_exp_lt] signed int __builtin_vec_scalar_cmp_exp_lt (double, double); VSCEDPLT signed int __builtin_vec_scalar_cmp_exp_lt (_Float128, _Float128); - VSCEQPLT + VSCEQPLT_KF + signed int __builtin_vec_scalar_cmp_exp_lt (long double, long double); + VSCEQPLT_TF [VEC_VSCEUO, scalar_cmp_exp_unordered, __builtin_vec_scalar_cmp_exp_unordered] signed int __builtin_vec_scalar_cmp_exp_unordered (double, double); VSCEDPUO signed int __builtin_vec_scalar_cmp_exp_unordered (_Float128, _Float128); - VSCEQPUO + VSCEQPUO_KF + signed int __builtin_vec_scalar_cmp_exp_unordered (long double, long double); + VSCEQPUO_TF [VEC_VSEE, scalar_extract_exp, __builtin_vec_scalar_extract_exp] unsigned int __builtin_vec_scalar_extract_exp (double);