aboutsummaryrefslogtreecommitdiff
path: root/gcc/builtins.c
diff options
context:
space:
mode:
authorBrad Lucier <lucier@math.purdue.edu>2001-03-07 11:29:41 -0800
committerRichard Henderson <rth@gcc.gnu.org>2001-03-07 11:29:41 -0800
commitde6c59795844f185e1079034b9fa777fbc12ef5a (patch)
tree996aa9dfa54be0d228dde6e7394f9adf66f7c76c /gcc/builtins.c
parent6822468a694e59639c0f97975a2f48951501fd37 (diff)
downloadgcc-de6c59795844f185e1079034b9fa777fbc12ef5a.zip
gcc-de6c59795844f185e1079034b9fa777fbc12ef5a.tar.gz
gcc-de6c59795844f185e1079034b9fa777fbc12ef5a.tar.bz2
Brad's -ffast-math breakup.
From-SVN: r40300
Diffstat (limited to 'gcc/builtins.c')
-rw-r--r--gcc/builtins.c11
1 files changed, 6 insertions, 5 deletions
diff --git a/gcc/builtins.c b/gcc/builtins.c
index 3dedc5b..8ccd092 100644
--- a/gcc/builtins.c
+++ b/gcc/builtins.c
@@ -1430,10 +1430,10 @@ expand_builtin_mathfn (exp, target, subtarget)
return 0;
}
- /* Check the results by default. But if flag_fast_math is turned on,
- then assume sqrt will always be called with valid arguments. */
+ /* If errno must be maintained and if we are not allowing unsafe
+ math optimizations, check the result. */
- if (flag_errno_math && ! flag_fast_math)
+ if (flag_errno_math && ! flag_unsafe_math_optimizations)
{
rtx lab1;
@@ -3329,8 +3329,9 @@ expand_builtin (exp, target, subtarget, mode, ignore)
case BUILT_IN_SIN:
case BUILT_IN_COS:
- /* Treat these like sqrt, but only if the user asks for them. */
- if (! flag_fast_math)
+ /* Treat these like sqrt only if unsafe math optimizations are allowed,
+ because of possible accuracy problems. */
+ if (! flag_unsafe_math_optimizations)
break;
case BUILT_IN_FSQRT:
target = expand_builtin_mathfn (exp, target, subtarget);