public inbox for gcc-cvs@sourceware.org help / color / mirror / Atom feed
From: William Schmidt <wschmidt@gcc.gnu.org> To: gcc-cvs@gcc.gnu.org Subject: [gcc r12-4999] rs6000: Miscellaneous uses of rs6000_builtins_decl_x Date: Mon, 8 Nov 2021 14:49:57 +0000 (GMT) [thread overview] Message-ID: <20211108144957.72598385800F@sourceware.org> (raw) https://gcc.gnu.org/g:a354b4255b679de45bd3d4d8874a26c89f6c74fc commit r12-4999-ga354b4255b679de45bd3d4d8874a26c89f6c74fc Author: Bill Schmidt <wschmidt@linux.ibm.com> Date: Mon Nov 8 08:34:03 2021 -0600 rs6000: Miscellaneous uses of rs6000_builtins_decl_x There are a few leftover places where we use the old rs6000_builtins_decl array, but we need to use rs6000_builtins_decl_x instead when the new builtins infrastructure is in play. 2021-11-08 Bill Schmidt <wschmidt@linux.ibm.com> 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 | 17 ++++++++++++++--- 1 file changed, 14 insertions(+), 3 deletions(-) diff --git a/gcc/config/rs6000/rs6000.c b/gcc/config/rs6000/rs6000.c index ec054800491..1f2aa60348b 100644 --- a/gcc/config/rs6000/rs6000.c +++ b/gcc/config/rs6000/rs6000.c @@ -22743,12 +22743,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: @@ -25371,7 +25375,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); @@ -28011,8 +28018,12 @@ 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)
reply other threads:[~2021-11-08 14:49 UTC|newest] Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=20211108144957.72598385800F@sourceware.org \ --to=wschmidt@gcc.gnu.org \ --cc=gcc-cvs@gcc.gnu.org \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).