diff options
author | Jan Hubicka <jh@suse.cz> | 2010-11-17 22:11:24 +0100 |
---|---|---|
committer | Jan Hubicka <hubicka@gcc.gnu.org> | 2010-11-17 21:11:24 +0000 |
commit | fc48e63f52d3cd97ddcd68509635558b46a3e2b9 (patch) | |
tree | 14ebecc51ca2580cab86af780c03639ffac80b9e /gcc | |
parent | 7ad93142a811fc19c99d1e61f994c32344f73794 (diff) | |
download | gcc-fc48e63f52d3cd97ddcd68509635558b46a3e2b9.zip gcc-fc48e63f52d3cd97ddcd68509635558b46a3e2b9.tar.gz gcc-fc48e63f52d3cd97ddcd68509635558b46a3e2b9.tar.bz2 |
builtins.c (expand_builtin_mathfn_2, [...]): Do not expand errno setting variant when optimizing for size.
* builtins.c (expand_builtin_mathfn_2, expand_builtin_mathfn): Do not
expand errno setting variant when optimizing for size.
From-SVN: r166879
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/ChangeLog | 5 | ||||
-rw-r--r-- | gcc/builtins.c | 6 |
2 files changed, 10 insertions, 1 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 005e26a..d21e2e9 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,8 @@ +2010-11-17 Jan Hubicka <jh@suse.cz> + + * builtins.c (expand_builtin_mathfn_2, expand_builtin_mathfn): Do not + expand errno setting variant when optimizing for size. + 2010-11-17 Eric Botcazou <ebotcazou@adacore.com> * postreload.c (reload_combine): Call control_flow_insn_p only once. diff --git a/gcc/builtins.c b/gcc/builtins.c index 4eb7047..5f2959c 100644 --- a/gcc/builtins.c +++ b/gcc/builtins.c @@ -2039,7 +2039,8 @@ 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) != CODE_FOR_nothing) + if (optab_handler (builtin_optab, mode) != CODE_FOR_nothing + && (!errno_set || !optimize_insn_for_size_p ())) { target = gen_reg_rtx (mode); @@ -2149,6 +2150,9 @@ expand_builtin_mathfn_2 (tree exp, rtx target, rtx subtarget) if (! flag_errno_math || ! HONOR_NANS (mode)) errno_set = false; + if (errno_set && optimize_insn_for_size_p ()) + return 0; + /* Always stabilize the argument list. */ CALL_EXPR_ARG (exp, 0) = arg0 = builtin_save_expr (arg0); CALL_EXPR_ARG (exp, 1) = arg1 = builtin_save_expr (arg1); |