aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorToon Moene <toon@moene.indiv.nluug.nl>2002-08-01 11:08:38 +0200
committerToon Moene <toon@gcc.gnu.org>2002-08-01 09:08:38 +0000
commit73e42cf3428cf6ef08888c2ddeb5722a9c56bb8c (patch)
treebd9ac9db3906b37c6b2b5dac72cf898ae5f19f74
parente466f36952e08f91ce9490964cb93364ff29e6df (diff)
downloadgcc-73e42cf3428cf6ef08888c2ddeb5722a9c56bb8c.zip
gcc-73e42cf3428cf6ef08888c2ddeb5722a9c56bb8c.tar.gz
gcc-73e42cf3428cf6ef08888c2ddeb5722a9c56bb8c.tar.bz2
c-common.c (cb_register_builtins): Set __FINITE_MATH_ONLY__ to 1 if -ffinite-math-only is given, and to 0 otherwise.
2002-08-01 Toon Moene <toon@moene.indiv.nluug.nl> * c-common.c (cb_register_builtins): Set __FINITE_MATH_ONLY__ to 1 if -ffinite-math-only is given, and to 0 otherwise. * combine.c (simplify_if_then_else): HONOR_NANS implies FLOAT_MODE_P. From-SVN: r55932
-rw-r--r--gcc/ChangeLog8
-rw-r--r--gcc/c-common.c4
-rw-r--r--gcc/combine.c4
3 files changed, 13 insertions, 3 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index 5487dfc..42d40c9 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,11 @@
+2002-08-01 Toon Moene <toon@moene.indiv.nluug.nl>
+
+ * c-common.c (cb_register_builtins): Set
+ __FINITE_MATH_ONLY__ to 1 if -ffinite-math-only
+ is given, and to 0 otherwise.
+ * combine.c (simplify_if_then_else): HONOR_NANS
+ implies FLOAT_MODE_P.
+
2002-08-01 Neil Booth <neil@daikokuya.co.uk>
* cppinit.c (COMMAND_LINE_OPTIONS): Remove OPT_dollar.
diff --git a/gcc/c-common.c b/gcc/c-common.c
index 784cc64..b9df2e2 100644
--- a/gcc/c-common.c
+++ b/gcc/c-common.c
@@ -4784,7 +4784,9 @@ cb_register_builtins (pfile)
if (flag_signaling_nans)
cpp_define (pfile, "__SUPPORT_SNAN__");
if (flag_finite_math_only)
- cpp_define (pfile, "__FINITE_MATH_ONLY__");
+ cpp_define (pfile, "__FINITE_MATH_ONLY__=1");
+ else
+ cpp_define (pfile, "__FINITE_MATH_ONLY__=0");
if (flag_iso)
cpp_define (pfile, "__STRICT_ANSI__");
diff --git a/gcc/combine.c b/gcc/combine.c
index 297e6a4..236ac2e 100644
--- a/gcc/combine.c
+++ b/gcc/combine.c
@@ -4775,12 +4775,12 @@ simplify_if_then_else (x)
/* Convert a == b ? b : a to "a". */
if (true_code == EQ && ! side_effects_p (cond)
- && (!FLOAT_MODE_P (mode) || !HONOR_NANS (mode))
+ && !HONOR_NANS (mode)
&& rtx_equal_p (XEXP (cond, 0), false_rtx)
&& rtx_equal_p (XEXP (cond, 1), true_rtx))
return false_rtx;
else if (true_code == NE && ! side_effects_p (cond)
- && (!FLOAT_MODE_P (mode) || !HONOR_NANS (mode))
+ && !HONOR_NANS (mode)
&& rtx_equal_p (XEXP (cond, 0), true_rtx)
&& rtx_equal_p (XEXP (cond, 1), false_rtx))
return true_rtx;