From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 1005) id 082973858C54; Thu, 14 Jul 2022 00:36:06 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 082973858C54 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/work094)] Revert patches. X-Act-Checkin: gcc X-Git-Author: Michael Meissner X-Git-Refname: refs/users/meissner/heads/work094 X-Git-Oldrev: e443d60477a4bbb1c954f49e9ebb177b39188333 X-Git-Newrev: 9875f69db90ad868d53034ef3fe58b034d477d51 Message-Id: <20220714003606.082973858C54@sourceware.org> Date: Thu, 14 Jul 2022 00:36:06 +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: Thu, 14 Jul 2022 00:36:06 -0000 https://gcc.gnu.org/g:9875f69db90ad868d53034ef3fe58b034d477d51 commit 9875f69db90ad868d53034ef3fe58b034d477d51 Author: Michael Meissner Date: Wed Jul 13 20:35:14 2022 -0400 Revert patches. 2022-07-13 Michael Meissner gcc/ Revert patches. * config/rs6000/rs6000-builtins.def (__builtin_vsx_scalar_extract_expq_kf): Rename KFmode IEEE 128-bit insert and extract built-in functions to have a KF suffix to allow overloading. (__builtin_vsx_scalar_extract_sigq_kf): Likewise. (__builtin_vsx_scalar_insert_exp_qp_kf): Likewise. (__builtin_vsx_scalar_extract_expq_tf): Add TFmode variants for IEEE 128-bit insert and extract support. (__builtin_vsx_scalar_extract_sigq_tf): Likewise. (__builtin_vsx_scalar_insert_exp_qp_tf): Likewise. * config/rs6000/rs6000-c.cc (altivec_resolve_overloaded_builtin): Add support for having KFmode and TFmode variants of VSIEQPF. * config/rs6000/rs6000-overload.def (__builtin_vec_scalar_extract_exp): Add TFmode overloads. (__builtin_vec_scalar_extract_sig): Likewise. (__builtin_vec_scalar_insert_exp): Likewise. gcc/testsuite/ Revert patches. * gcc.target/powerpc/bfp/scalar-extract-exp-4.c: Update the expected error message. * gcc.target/powerpc/bfp/scalar-extract-sig-4.c: Likewise. * gcc.target/powerpc/bfp/scalar-insert-exp-10.c: Likewise. 2022-07-13 Michael Meissner gcc/ Revert patches. * config/rs6000/rs6000-builtins.def (__builtin_vsx_scalar_test_data_class_qp_kf): Rename KFmode IEEE 128-bit test data built-in functions to have a KF suffix to allow overloading. (__builtin_vsx_scalar_test_neg_qp_kf): Likewise. (__builtin_vsx_scalar_test_data_class_qp_tf): Add TFmode variants for IEEE 128-bit insert and extract support. (__builtin_vsx_scalar_test_neg_qp_tf): Likewise. * config/rs6000/rs6000-overload.def (__builtin_vec_scalar_test_data_class): Add TFmode overloads. (__builtin_vec_scalar_test_neg): Likewise. (__builtin_vec_scalar_test_neg_qp): Likewise. (__builtin_vec_scalar_test_data_class_qp): Likewise. gcc/testsuite/ Revert patches. * gcc.target/powerpc/bfp/scalar-test-data-class-11.c: Update the expected error message. * gcc.target/powerpc/bfp/scalar-test-neg-5.c: Likewise. Diff: --- gcc/config/rs6000/rs6000-builtins.def | 43 ++++++---------------- gcc/config/rs6000/rs6000-c.cc | 10 ++--- gcc/config/rs6000/rs6000-overload.def | 30 ++++----------- .../gcc.target/powerpc/bfp/scalar-extract-exp-4.c | 2 +- .../gcc.target/powerpc/bfp/scalar-extract-sig-4.c | 2 +- .../gcc.target/powerpc/bfp/scalar-insert-exp-10.c | 2 +- .../powerpc/bfp/scalar-test-data-class-11.c | 2 +- .../gcc.target/powerpc/bfp/scalar-test-neg-5.c | 2 +- 8 files changed, 29 insertions(+), 64 deletions(-) diff --git a/gcc/config/rs6000/rs6000-builtins.def b/gcc/config/rs6000/rs6000-builtins.def index c57fcafed1b..e96b89c449b 100644 --- a/gcc/config/rs6000/rs6000-builtins.def +++ b/gcc/config/rs6000/rs6000-builtins.def @@ -2902,28 +2902,26 @@ fpmath double __builtin_truncf128_round_to_odd_kf (_Float128); TRUNCF128_ODD_KF trunckfdf2_odd {} - const signed long long __builtin_vsx_scalar_extract_expq_kf (_Float128); - VSEEQP_KF xsxexpqp_kf {} + const signed long long __builtin_vsx_scalar_extract_expq (_Float128); + VSEEQP xsxexpqp_kf {} - const signed __int128 __builtin_vsx_scalar_extract_sigq_kf (_Float128); - VSESQP_KF xsxsigqp_kf {} + const signed __int128 __builtin_vsx_scalar_extract_sigq (_Float128); + VSESQP xsxsigqp_kf {} -; Note we cannot overload this function since it does not have KFmode -; or TFmode arguments. const _Float128 __builtin_vsx_scalar_insert_exp_q (unsigned __int128, \ unsigned long long); VSIEQP xsiexpqp_kf {} - const _Float128 __builtin_vsx_scalar_insert_exp_qp_kf (_Float128, \ - unsigned long long); - VSIEQPF_KF xsiexpqpf_kf {} + const _Float128 __builtin_vsx_scalar_insert_exp_qp (_Float128, \ + unsigned long long); + VSIEQPF xsiexpqpf_kf {} - const signed int __builtin_vsx_scalar_test_data_class_qp_kf (_Float128, \ - const int<7>); - VSTDCQP_KF xststdcqp_kf {} + const signed int __builtin_vsx_scalar_test_data_class_qp (_Float128, \ + const int<7>); + VSTDCQP xststdcqp_kf {} - const signed int __builtin_vsx_scalar_test_neg_qp_kf (_Float128); - VSTDCNQP_KF xststdcnegqp_kf {} + const signed int __builtin_vsx_scalar_test_neg_qp (_Float128); + VSTDCNQP xststdcnegqp_kf {} ; Builtins requiring hardware support for IEEE-128 floating-point. Long double @@ -2970,23 +2968,6 @@ fpmath double __builtin_truncf128_round_to_odd_tf (long double); TRUNCF128_ODD_TF trunctfdf2_odd {ieeeld} - const signed long long __builtin_vsx_scalar_extract_expq_tf (long double); - VSEEQP_TF xsxexpqp_tf {ieeeld} - - const signed __int128 __builtin_vsx_scalar_extract_sigq_tf (long double); - VSESQP_TF xsxsigqp_tf {ieeeld} - - const long double __builtin_vsx_scalar_insert_exp_qp_tf (_Float128, \ - unsigned long long); - VSIEQPF_TF xsiexpqpf_tf {ieeeld} - - const signed int __builtin_vsx_scalar_test_data_class_qp_tf (_Float128, \ - const int<7>); - VSTDCQP_TF xststdcqp_tf {ieeeld} - - const signed int __builtin_vsx_scalar_test_neg_qp_tf (_Float128); - VSTDCNQP_TF xststdcnegqp_tf {ieeeld} - ; Decimal floating-point builtins. [dfp] diff --git a/gcc/config/rs6000/rs6000-c.cc b/gcc/config/rs6000/rs6000-c.cc index 4532cb4624b..0d13645040f 100644 --- a/gcc/config/rs6000/rs6000-c.cc +++ b/gcc/config/rs6000/rs6000-c.cc @@ -1935,13 +1935,11 @@ altivec_resolve_overloaded_builtin (location_t loc, tree fndecl, 128-bit variant of built-in function. */ if (GET_MODE_PRECISION (arg1_mode) > 64) { - /* If first argument is of float variety, choose variant that - expects _Float128 argument (or long double if long doubles are - IEEE 128-bit). Otherwise, expect __int128 argument. */ + /* If first argument is of float variety, choose variant + that expects __ieee128 argument. Otherwise, expect + __int128 argument. */ if (GET_MODE_CLASS (arg1_mode) == MODE_FLOAT) - instance_code = ((arg1_mode == TFmode) - ? RS6000_BIF_VSIEQPF_TF - : RS6000_BIF_VSIEQPF_KF); + instance_code = RS6000_BIF_VSIEQPF; else instance_code = RS6000_BIF_VSIEQP; } diff --git a/gcc/config/rs6000/rs6000-overload.def b/gcc/config/rs6000/rs6000-overload.def index 572e3510360..511a3821d5b 100644 --- a/gcc/config/rs6000/rs6000-overload.def +++ b/gcc/config/rs6000/rs6000-overload.def @@ -4506,17 +4506,13 @@ unsigned int __builtin_vec_scalar_extract_exp (double); VSEEDP unsigned int __builtin_vec_scalar_extract_exp (_Float128); - VSEEQP_KF - unsigned int __builtin_vec_scalar_extract_exp (long double); - VSEEQP_TF + VSEEQP [VEC_VSES, scalar_extract_sig, __builtin_vec_scalar_extract_sig] unsigned long long __builtin_vec_scalar_extract_sig (double); VSESDP unsigned __int128 __builtin_vec_scalar_extract_sig (_Float128); - VSESQP_KF - unsigned __int128 __builtin_vec_scalar_extract_sig (long double); - VSESQP_TF + VSESQP [VEC_VSIE, scalar_insert_exp, __builtin_vec_scalar_insert_exp] double __builtin_vec_scalar_insert_exp (unsigned long long, unsigned long long); @@ -4526,9 +4522,7 @@ _Float128 __builtin_vec_scalar_insert_exp (unsigned __int128, unsigned long long); VSIEQP _Float128 __builtin_vec_scalar_insert_exp (_Float128, unsigned long long); - VSIEQPF_KF - long double __builtin_vec_scalar_insert_exp (long double, unsigned long long); - VSIEQPF_TF + VSIEQPF [VEC_VSTDC, scalar_test_data_class, __builtin_vec_scalar_test_data_class] unsigned int __builtin_vec_scalar_test_data_class (float, const int); @@ -4536,9 +4530,7 @@ unsigned int __builtin_vec_scalar_test_data_class (double, const int); VSTDCDP unsigned int __builtin_vec_scalar_test_data_class (_Float128, const int); - VSTDCQP_KF - unsigned int __builtin_vec_scalar_test_data_class (long double, const int); - VSTDCQP_TF + VSTDCQP [VEC_VSTDCN, scalar_test_neg, __builtin_vec_scalar_test_neg] unsigned int __builtin_vec_scalar_test_neg (float); @@ -4546,9 +4538,7 @@ unsigned int __builtin_vec_scalar_test_neg (double); VSTDCNDP unsigned int __builtin_vec_scalar_test_neg (_Float128); - VSTDCNQP_KF - unsigned int __builtin_vec_scalar_test_neg (long double); - VSTDCNQP_TF + VSTDCNQP [VEC_VTDC, vec_test_data_class, __builtin_vec_test_data_class] vbi __builtin_vec_test_data_class (vf, const int); @@ -5932,11 +5922,9 @@ unsigned int __builtin_vec_scalar_test_neg_dp (double); VSTDCNDP VSTDCNDP_DEPR1 -[VEC_VSTDCNQP_KF, scalar_test_neg_qp, __builtin_vec_scalar_test_neg_qp] +[VEC_VSTDCNQP, scalar_test_neg_qp, __builtin_vec_scalar_test_neg_qp] unsigned int __builtin_vec_scalar_test_neg_qp (_Float128); - VSTDCNQP_KF VSTDCNQP_KF_DEPR1 - unsigned int __builtin_vec_scalar_test_neg_qp (long double); - VSTDCNQP_TF VSTDCNQP_TF_DEPR1 + VSTDCNQP VSTDCNQP_DEPR1 [VEC_VSTDCNSP, scalar_test_neg_sp, __builtin_vec_scalar_test_neg_sp] unsigned int __builtin_vec_scalar_test_neg_sp (float); @@ -5944,9 +5932,7 @@ [VEC_VSTDCQP, scalar_test_data_class_qp, __builtin_vec_scalar_test_data_class_qp] unsigned int __builtin_vec_scalar_test_data_class_qp (_Float128, const int); - VSTDCQP_KF VSTDCQP_KF_DEPR1 - unsigned int __builtin_vec_scalar_test_data_class_qp (long double, const int); - VSTDCQP_TF VSTDCQP_TF_DEPR1 + VSTDCQP VSTDCQP_DEPR1 [VEC_VSTDCSP, scalar_test_data_class_sp, __builtin_vec_scalar_test_data_class_sp] unsigned int __builtin_vec_scalar_test_data_class_sp (float, const int); diff --git a/gcc/testsuite/gcc.target/powerpc/bfp/scalar-extract-exp-4.c b/gcc/testsuite/gcc.target/powerpc/bfp/scalar-extract-exp-4.c index 14c6554f417..850ff620490 100644 --- a/gcc/testsuite/gcc.target/powerpc/bfp/scalar-extract-exp-4.c +++ b/gcc/testsuite/gcc.target/powerpc/bfp/scalar-extract-exp-4.c @@ -11,7 +11,7 @@ get_exponent (__ieee128 *p) { __ieee128 source = *p; - return __builtin_vec_scalar_extract_exp (source); /* { dg-error "'__builtin_vsx_scalar_extract_expq.*' requires" } */ + return __builtin_vec_scalar_extract_exp (source); /* { dg-error "'__builtin_vsx_scalar_extract_expq' requires" } */ } diff --git a/gcc/testsuite/gcc.target/powerpc/bfp/scalar-extract-sig-4.c b/gcc/testsuite/gcc.target/powerpc/bfp/scalar-extract-sig-4.c index 9800cf65017..32a53c6fffd 100644 --- a/gcc/testsuite/gcc.target/powerpc/bfp/scalar-extract-sig-4.c +++ b/gcc/testsuite/gcc.target/powerpc/bfp/scalar-extract-sig-4.c @@ -11,5 +11,5 @@ get_significand (__ieee128 *p) { __ieee128 source = *p; - return __builtin_vec_scalar_extract_sig (source); /* { dg-error "'__builtin_vsx_scalar_extract_sigq.*' requires" } */ + return __builtin_vec_scalar_extract_sig (source); /* { dg-error "'__builtin_vsx_scalar_extract_sigq' requires" } */ } diff --git a/gcc/testsuite/gcc.target/powerpc/bfp/scalar-insert-exp-10.c b/gcc/testsuite/gcc.target/powerpc/bfp/scalar-insert-exp-10.c index 4018c8fa08a..769d3b0546a 100644 --- a/gcc/testsuite/gcc.target/powerpc/bfp/scalar-insert-exp-10.c +++ b/gcc/testsuite/gcc.target/powerpc/bfp/scalar-insert-exp-10.c @@ -13,5 +13,5 @@ insert_exponent (__ieee128 *significand_p, __ieee128 significand = *significand_p; unsigned long long int exponent = *exponent_p; - return __builtin_vec_scalar_insert_exp (significand, exponent); /* { dg-error "'__builtin_vsx_scalar_insert_exp_qp.*' requires" } */ + return __builtin_vec_scalar_insert_exp (significand, exponent); /* { dg-error "'__builtin_vsx_scalar_insert_exp_qp' requires" } */ } diff --git a/gcc/testsuite/gcc.target/powerpc/bfp/scalar-test-data-class-11.c b/gcc/testsuite/gcc.target/powerpc/bfp/scalar-test-data-class-11.c index 82da5956e05..7c6fca2b729 100644 --- a/gcc/testsuite/gcc.target/powerpc/bfp/scalar-test-data-class-11.c +++ b/gcc/testsuite/gcc.target/powerpc/bfp/scalar-test-data-class-11.c @@ -10,5 +10,5 @@ test_data_class (__ieee128 *p) { __ieee128 source = *p; - return __builtin_vec_scalar_test_data_class (source, 3); /* { dg-error "'__builtin_vsx_scalar_test_data_class_qp.*' requires" } */ + return __builtin_vec_scalar_test_data_class (source, 3); /* { dg-error "'__builtin_vsx_scalar_test_data_class_qp' requires" } */ } diff --git a/gcc/testsuite/gcc.target/powerpc/bfp/scalar-test-neg-5.c b/gcc/testsuite/gcc.target/powerpc/bfp/scalar-test-neg-5.c index eef02f40f3d..8c55c1cfb5c 100644 --- a/gcc/testsuite/gcc.target/powerpc/bfp/scalar-test-neg-5.c +++ b/gcc/testsuite/gcc.target/powerpc/bfp/scalar-test-neg-5.c @@ -10,5 +10,5 @@ test_neg (__ieee128 *p) { __ieee128 source = *p; - return __builtin_vec_scalar_test_neg (source); /* { dg-error "'__builtin_vsx_scalar_test_neg_qp.*' requires" } */ + return __builtin_vec_scalar_test_neg (source); /* { dg-error "'__builtin_vsx_scalar_test_neg_qp' requires" } */ }