aboutsummaryrefslogtreecommitdiff
path: root/gcc/builtins.c
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/builtins.c')
-rw-r--r--gcc/builtins.c21
1 files changed, 10 insertions, 11 deletions
diff --git a/gcc/builtins.c b/gcc/builtins.c
index ddbbd79..46cc03d 100644
--- a/gcc/builtins.c
+++ b/gcc/builtins.c
@@ -1994,7 +1994,7 @@ expand_builtin_mathfn (tree exp, rtx target, rtx subtarget)
errno_set = false;
/* Before working hard, check whether the instruction is available. */
- if (optab_handler (builtin_optab, mode)->insn_code != CODE_FOR_nothing)
+ if (optab_handler (builtin_optab, mode) != CODE_FOR_nothing)
{
target = gen_reg_rtx (mode);
@@ -2096,7 +2096,7 @@ expand_builtin_mathfn_2 (tree exp, rtx target, rtx subtarget)
mode = TYPE_MODE (TREE_TYPE (exp));
/* Before working hard, check whether the instruction is available. */
- if (optab_handler (builtin_optab, mode)->insn_code == CODE_FOR_nothing)
+ if (optab_handler (builtin_optab, mode) == CODE_FOR_nothing)
return NULL_RTX;
target = gen_reg_rtx (mode);
@@ -2173,7 +2173,7 @@ expand_builtin_mathfn_3 (tree exp, rtx target, rtx subtarget)
/* Check if sincos insn is available, otherwise fallback
to sin or cos insn. */
- if (optab_handler (builtin_optab, mode)->insn_code == CODE_FOR_nothing)
+ if (optab_handler (builtin_optab, mode) == CODE_FOR_nothing)
switch (DECL_FUNCTION_CODE (fndecl))
{
CASE_FLT_FN (BUILT_IN_SIN):
@@ -2185,7 +2185,7 @@ expand_builtin_mathfn_3 (tree exp, rtx target, rtx subtarget)
}
/* Before working hard, check whether the instruction is available. */
- if (optab_handler (builtin_optab, mode)->insn_code != CODE_FOR_nothing)
+ if (optab_handler (builtin_optab, mode) != CODE_FOR_nothing)
{
target = gen_reg_rtx (mode);
@@ -2282,7 +2282,7 @@ interclass_mathfn_icode (tree arg, tree fndecl)
mode = TYPE_MODE (TREE_TYPE (arg));
if (builtin_optab)
- return optab_handler (builtin_optab, mode)->insn_code;
+ return optab_handler (builtin_optab, mode);
return CODE_FOR_nothing;
}
@@ -2370,7 +2370,7 @@ expand_builtin_sincos (tree exp)
mode = TYPE_MODE (TREE_TYPE (arg));
/* Check if sincos insn is available, otherwise emit the call. */
- if (optab_handler (sincos_optab, mode)->insn_code == CODE_FOR_nothing)
+ if (optab_handler (sincos_optab, mode) == CODE_FOR_nothing)
return NULL_RTX;
target1 = gen_reg_rtx (mode);
@@ -2417,7 +2417,7 @@ expand_builtin_cexpi (tree exp, rtx target, rtx subtarget)
/* Try expanding via a sincos optab, fall back to emitting a libcall
to sincos or cexp. We are sure we have sincos or cexp because cexpi
is only generated from sincos, cexp or if we have either of them. */
- if (optab_handler (sincos_optab, mode)->insn_code != CODE_FOR_nothing)
+ if (optab_handler (sincos_optab, mode) != CODE_FOR_nothing)
{
op1 = gen_reg_rtx (mode);
op2 = gen_reg_rtx (mode);
@@ -3080,8 +3080,7 @@ expand_builtin_pow (tree exp, rtx target, rtx subtarget)
smaller than pow (x, 1.5) if sqrt will not be expanded
as a call. */
|| (n == 3
- && (optab_handler (sqrt_optab, mode)->insn_code
- != CODE_FOR_nothing))))
+ && optab_handler (sqrt_optab, mode) != CODE_FOR_nothing)))
{
tree call_expr = build_call_nofold_loc (EXPR_LOCATION (exp), fn, 1,
narg0);
@@ -3272,7 +3271,7 @@ expand_builtin_strlen (tree exp, rtx target,
/* Bail out if we can't compute strlen in the right mode. */
while (insn_mode != VOIDmode)
{
- icode = optab_handler (strlen_optab, insn_mode)->insn_code;
+ icode = optab_handler (strlen_optab, insn_mode);
if (icode != CODE_FOR_nothing)
break;
@@ -5308,7 +5307,7 @@ expand_builtin_signbit (tree exp, rtx target)
/* Check if the back end provides an insn that handles signbit for the
argument's mode. */
- icode = signbit_optab->handlers [(int) fmode].insn_code;
+ icode = optab_handler (signbit_optab, fmode);
if (icode != CODE_FOR_nothing)
{
rtx last = get_last_insn ();