summaryrefslogtreecommitdiff
path: root/gcc/dojump.c
diff options
context:
space:
mode:
authorjason <jason@138bc75d-0d04-0410-961f-82ee72b054a4>2003-08-20 19:27:49 +0000
committerjason <jason@138bc75d-0d04-0410-961f-82ee72b054a4>2003-08-20 19:27:49 +0000
commitc6e6ecb1424b2f6d79365e15df8fc62d968b3d8e (patch)
tree5818d3a73137a0b34a7c1c1e65be34505d270b05 /gcc/dojump.c
parent11dfb79c5033ddb5a88fbf1cba31b10015df0aa5 (diff)
downloadgcc-c6e6ecb1424b2f6d79365e15df8fc62d968b3d8e.tar.gz
* builtins.c (expand_builtin_mathfn): Use get_callee_fndecl.
(expand_builtin_mathfn2, expand_builtin, builtin_mathfn_code, fold_trunc_transparent_mathfn, fold_builtin): Likewise. * dojump.c (do_jump): Likewise. * fold-const.c (operand_equal_p, fold): Likewise. (tree_expr_nonnegative_p): Likewise. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@70611 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/dojump.c')
-rw-r--r--gcc/dojump.c41
1 files changed, 20 insertions, 21 deletions
diff --git a/gcc/dojump.c b/gcc/dojump.c
index c213cd0e967..2ed014bacf9 100644
--- a/gcc/dojump.c
+++ b/gcc/dojump.c
@@ -530,27 +530,26 @@ do_jump (tree exp, rtx if_false_label, rtx if_true_label)
operation produced a 1 or 0. */
case CALL_EXPR:
/* Check for a built-in function. */
- if (TREE_CODE (TREE_OPERAND (exp, 0)) == ADDR_EXPR)
- {
- tree fndecl = TREE_OPERAND (TREE_OPERAND (exp, 0), 0);
- tree arglist = TREE_OPERAND (exp, 1);
-
- if (TREE_CODE (fndecl) == FUNCTION_DECL
- && DECL_BUILT_IN (fndecl)
- && DECL_FUNCTION_CODE (fndecl) == BUILT_IN_EXPECT
- && arglist != NULL_TREE
- && TREE_CHAIN (arglist) != NULL_TREE)
- {
- rtx seq = expand_builtin_expect_jump (exp, if_false_label,
- if_true_label);
-
- if (seq != NULL_RTX)
- {
- emit_insn (seq);
- return;
- }
- }
- }
+ {
+ tree fndecl = get_callee_fndecl (exp);
+ tree arglist = TREE_OPERAND (exp, 1);
+
+ if (fndecl
+ && DECL_BUILT_IN (fndecl)
+ && DECL_FUNCTION_CODE (fndecl) == BUILT_IN_EXPECT
+ && arglist != NULL_TREE
+ && TREE_CHAIN (arglist) != NULL_TREE)
+ {
+ rtx seq = expand_builtin_expect_jump (exp, if_false_label,
+ if_true_label);
+
+ if (seq != NULL_RTX)
+ {
+ emit_insn (seq);
+ return;
+ }
+ }
+ }
/* Fall through and generate the normal code. */
default: