From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mx0b-001b2d01.pphosted.com (mx0b-001b2d01.pphosted.com [148.163.158.5]) by sourceware.org (Postfix) with ESMTPS id 9B9F33983C52 for ; Tue, 27 Jul 2021 21:08:39 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 9B9F33983C52 Received: from pps.filterd (m0127361.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.16.0.43/8.16.0.43) with SMTP id 16RL4Xnl069666; Tue, 27 Jul 2021 17:08:39 -0400 Received: from ppma04dal.us.ibm.com (7a.29.35a9.ip4.static.sl-reverse.com [169.53.41.122]) by mx0a-001b2d01.pphosted.com with ESMTP id 3a2seyru4n-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Tue, 27 Jul 2021 17:08:39 -0400 Received: from pps.filterd (ppma04dal.us.ibm.com [127.0.0.1]) by ppma04dal.us.ibm.com (8.16.1.2/8.16.1.2) with SMTP id 16RL2PT3027042; Tue, 27 Jul 2021 21:08:38 GMT Received: from b03cxnp07027.gho.boulder.ibm.com (b03cxnp07027.gho.boulder.ibm.com [9.17.130.14]) by ppma04dal.us.ibm.com with ESMTP id 3a235ndg84-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Tue, 27 Jul 2021 21:08:38 +0000 Received: from b03ledav005.gho.boulder.ibm.com (b03ledav005.gho.boulder.ibm.com [9.17.130.236]) by b03cxnp07027.gho.boulder.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id 16RL8avn31850856 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Tue, 27 Jul 2021 21:08:37 GMT Received: from b03ledav005.gho.boulder.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id D136FBE051; Tue, 27 Jul 2021 21:08:36 +0000 (GMT) Received: from b03ledav005.gho.boulder.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 8ED62BE04F; Tue, 27 Jul 2021 21:08:35 +0000 (GMT) Received: from lexx (unknown [9.171.17.235]) by b03ledav005.gho.boulder.ibm.com (Postfix) with ESMTP; Tue, 27 Jul 2021 21:08:35 +0000 (GMT) Message-ID: <587381fcf05089e01fbf5e2977a16f9d9951247d.camel@vnet.ibm.com> Subject: Re: [PATCH 51/55] rs6000: Miscellaneous uses of rs6000_builtin_decls_x From: will schmidt To: Bill Schmidt , gcc-patches@gcc.gnu.org Cc: segher@kernel.crashing.org Date: Tue, 27 Jul 2021 16:08:33 -0500 In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" X-Mailer: Evolution 3.28.5 (3.28.5-10.el7) Mime-Version: 1.0 Content-Transfer-Encoding: 7bit X-TM-AS-GCONF: 00 X-Proofpoint-GUID: OSU7DKgYRFhVivY5m-OCiKdRYzCW64WM X-Proofpoint-ORIG-GUID: OSU7DKgYRFhVivY5m-OCiKdRYzCW64WM X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:6.0.391, 18.0.790 definitions=2021-07-27_14:2021-07-27, 2021-07-27 signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 malwarescore=0 lowpriorityscore=0 clxscore=1015 priorityscore=1501 spamscore=0 impostorscore=0 bulkscore=0 adultscore=0 phishscore=0 mlxlogscore=999 suspectscore=0 mlxscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2107140000 definitions=main-2107270123 X-Spam-Status: No, score=-12.5 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_EF, GIT_PATCH_0, RCVD_IN_MSPIKE_H2, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.4 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on server2.sourceware.org X-BeenThere: gcc-patches@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 27 Jul 2021 21:08:40 -0000 On Thu, 2021-06-17 at 10:19 -0500, Bill Schmidt via Gcc-patches wrote: > 2021-03-05 Bill Schmidt > Hi, Could use a longer description. > gcc/ > * config/rs6000/rs6000.c (rs6000_builtin_reciprocal): Use > rs6000_builtin_decls_x when appropriate. > (add_condition_to_bb): Likewise. > (rs6000_atomic_assign_expand_fenv): Likewise. > --- > gcc/config/rs6000/rs6000.c | 19 ++++++++++++++++--- > 1 file changed, 16 insertions(+), 3 deletions(-) > > diff --git a/gcc/config/rs6000/rs6000.c b/gcc/config/rs6000/rs6000.c > index 70a2be90787..7f6c1f8036e 100644 > --- a/gcc/config/rs6000/rs6000.c > +++ b/gcc/config/rs6000/rs6000.c > @@ -22767,12 +22767,16 @@ rs6000_builtin_reciprocal (tree fndecl) > if (!RS6000_RECIP_AUTO_RSQRTE_P (V2DFmode)) > return NULL_TREE; > > + if (new_builtins_are_live) > + return rs6000_builtin_decls_x[RS6000_BIF_RSQRT_2DF]; > return rs6000_builtin_decls[VSX_BUILTIN_RSQRT_2DF]; > > case VSX_BUILTIN_XVSQRTSP: > if (!RS6000_RECIP_AUTO_RSQRTE_P (V4SFmode)) > return NULL_TREE; > > + if (new_builtins_are_live) > + return rs6000_builtin_decls_x[RS6000_BIF_RSQRT_4SF]; > return rs6000_builtin_decls[VSX_BUILTIN_RSQRT_4SF]; > ok > default: > @@ -25361,7 +25365,10 @@ add_condition_to_bb (tree function_decl, > tree version_decl, > > tree bool_zero = build_int_cst (bool_int_type_node, 0); > tree cond_var = create_tmp_var (bool_int_type_node); > - tree predicate_decl = rs6000_builtin_decls [(int) > RS6000_BUILTIN_CPU_SUPPORTS]; > + tree predicate_decl > + = (new_builtins_are_live > + ? rs6000_builtin_decls_x[(int) RS6000_BIF_CPU_SUPPORTS] > + : rs6000_builtin_decls [(int) RS6000_BUILTIN_CPU_SUPPORTS]); > const char *arg_str = rs6000_clone_map[clone_isa].name; > tree predicate_arg = build_string_literal (strlen (arg_str) + 1, > arg_str); > gimple *call_cond_stmt = gimple_build_call (predicate_decl, 1, > predicate_arg); > @@ -27586,8 +27593,14 @@ rs6000_atomic_assign_expand_fenv (tree > *hold, tree *clear, tree *update) > return; > } > > - tree mffs = rs6000_builtin_decls[RS6000_BUILTIN_MFFS]; > - tree mtfsf = rs6000_builtin_decls[RS6000_BUILTIN_MTFSF]; > + tree mffs > + = (new_builtins_are_live > + ? rs6000_builtin_decls_x[RS6000_BIF_MFFS] > + : rs6000_builtin_decls[RS6000_BUILTIN_MFFS]); > + tree mtfsf > + = (new_builtins_are_live > + ? rs6000_builtin_decls_x[RS6000_BIF_MTFSF] > + : rs6000_builtin_decls[RS6000_BUILTIN_MTFSF]); > tree call_mffs = build_call_expr (mffs, 0); ok, lgtm, thanks -Will > > /* Generates the equivalent of feholdexcept (&fenv_var)