From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 1725) id 1E5903857C6B; Thu, 25 Mar 2021 15:48:43 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 1E5903857C6B Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: William Schmidt To: gcc-cvs@gcc.gnu.org Subject: [gcc(refs/users/wschmidt/heads/builtins10)] rs6000: Miscellaneous uses of rs6000_builtin_decls_x X-Act-Checkin: gcc X-Git-Author: Bill Schmidt X-Git-Refname: refs/users/wschmidt/heads/builtins10 X-Git-Oldrev: 944bba3a192590182f768e0f034066cd2379bf58 X-Git-Newrev: 3405f5849345b6c9698b7e5e566e41058d6606e7 Message-Id: <20210325154843.1E5903857C6B@sourceware.org> Date: Thu, 25 Mar 2021 15:48:43 +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, 25 Mar 2021 15:48:43 -0000 https://gcc.gnu.org/g:3405f5849345b6c9698b7e5e566e41058d6606e7 commit 3405f5849345b6c9698b7e5e566e41058d6606e7 Author: Bill Schmidt Date: Fri Mar 5 16:14:19 2021 -0600 rs6000: Miscellaneous uses of rs6000_builtin_decls_x 2021-03-05 Bill Schmidt 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. Diff: --- 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 487c0ac7012..0f4ca5e698a 100644 --- a/gcc/config/rs6000/rs6000.c +++ b/gcc/config/rs6000/rs6000.c @@ -22591,12 +22591,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]; default: @@ -25160,7 +25164,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); @@ -27369,8 +27376,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); /* Generates the equivalent of feholdexcept (&fenv_var)