summaryrefslogtreecommitdiff
path: root/gcc/simplify-rtx.c
diff options
context:
space:
mode:
authortoon <toon@138bc75d-0d04-0410-961f-82ee72b054a4>2002-08-02 11:01:31 +0000
committertoon <toon@138bc75d-0d04-0410-961f-82ee72b054a4>2002-08-02 11:01:31 +0000
commit0b91d495ba909ef43abcb035bdb3776966bd9612 (patch)
tree80947de2c0a402b92da9a5341fccbff49d0fd0c4 /gcc/simplify-rtx.c
parent00ae6be78c05e5130c3bcf817720f7817e755f68 (diff)
downloadgcc-0b91d495ba909ef43abcb035bdb3776966bd9612.tar.gz
2002-08-02 Toon Moene <toon@moene.indiv.nluug.nl>
* simplify-rtx.c (simplify_binary_operation): x * 1 is allowed when not honoring signalling NaNs. (simplify_ternary_operation): a == b has a definite value when not honoring NaNs. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@55980 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/simplify-rtx.c')
-rw-r--r--gcc/simplify-rtx.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/gcc/simplify-rtx.c b/gcc/simplify-rtx.c
index 135846ca82f..14e8840d447 100644
--- a/gcc/simplify-rtx.c
+++ b/gcc/simplify-rtx.c
@@ -1169,10 +1169,10 @@ simplify_binary_operation (code, mode, op0, op1)
&& ! side_effects_p (op0))
return op1;
- /* In IEEE floating point, x*1 is not equivalent to x for nans.
- However, ANSI says we can drop signals,
- so we can do this anyway. */
- if (trueop1 == CONST1_RTX (mode))
+ /* In IEEE floating point, x*1 is not equivalent to x for
+ signalling NaNs. */
+ if (!HONOR_SNANS (mode)
+ && trueop1 == CONST1_RTX (mode))
return op0;
/* Convert multiply by constant power of two into shift unless
@@ -2193,12 +2193,12 @@ simplify_ternary_operation (code, mode, op0_mode, op0, op1, op2)
/* Convert a == b ? b : a to "a". */
if (GET_CODE (op0) == NE && ! side_effects_p (op0)
- && (! FLOAT_MODE_P (mode) || flag_unsafe_math_optimizations)
+ && !HONOR_NANS (mode)
&& rtx_equal_p (XEXP (op0, 0), op1)
&& rtx_equal_p (XEXP (op0, 1), op2))
return op1;
else if (GET_CODE (op0) == EQ && ! side_effects_p (op0)
- && (! FLOAT_MODE_P (mode) || flag_unsafe_math_optimizations)
+ && !HONOR_NANS (mode)
&& rtx_equal_p (XEXP (op0, 1), op1)
&& rtx_equal_p (XEXP (op0, 0), op2))
return op2;