diff options
Diffstat (limited to 'gcc/simplify-rtx.c')
-rw-r--r-- | gcc/simplify-rtx.c | 30 |
1 files changed, 15 insertions, 15 deletions
diff --git a/gcc/simplify-rtx.c b/gcc/simplify-rtx.c index 43d650c..dd7d2e1 100644 --- a/gcc/simplify-rtx.c +++ b/gcc/simplify-rtx.c @@ -903,7 +903,7 @@ simplify_binary_operation (code, mode, op0, op1) /* In IEEE floating point, x+0 is not the same as x. Similarly for the other optimizations below. */ if (TARGET_FLOAT_FORMAT == IEEE_FLOAT_FORMAT - && FLOAT_MODE_P (mode) && ! flag_fast_math) + && FLOAT_MODE_P (mode) && ! flag_unsafe_math_optimizations) break; if (op1 == CONST0_RTX (mode)) @@ -1004,7 +1004,7 @@ simplify_binary_operation (code, mode, op0, op1) In IEEE floating point, x-0 is not the same as x. */ if ((TARGET_FLOAT_FORMAT != IEEE_FLOAT_FORMAT - || ! FLOAT_MODE_P (mode) || flag_fast_math) + || ! FLOAT_MODE_P (mode) || flag_unsafe_math_optimizations) && op1 == CONST0_RTX (mode)) return op0; #endif @@ -1034,15 +1034,15 @@ simplify_binary_operation (code, mode, op0, op1) /* None of these optimizations can be done for IEEE floating point. */ if (TARGET_FLOAT_FORMAT == IEEE_FLOAT_FORMAT - && FLOAT_MODE_P (mode) && ! flag_fast_math) + && FLOAT_MODE_P (mode) && ! flag_unsafe_math_optimizations) break; /* We can't assume x-x is 0 even with non-IEEE floating point, but since it is zero except in very strange circumstances, we - will treat it as zero with -ffast-math. */ + will treat it as zero with -funsafe-math-optimizations. */ if (rtx_equal_p (op0, op1) && ! side_effects_p (op0) - && (! FLOAT_MODE_P (mode) || flag_fast_math)) + && (! FLOAT_MODE_P (mode) || flag_unsafe_math_optimizations)) return CONST0_RTX (mode); /* Change subtraction from zero into negation. */ @@ -1153,7 +1153,7 @@ simplify_binary_operation (code, mode, op0, op1) /* In IEEE floating point, x*0 is not always 0. */ if ((TARGET_FLOAT_FORMAT != IEEE_FLOAT_FORMAT - || ! FLOAT_MODE_P (mode) || flag_fast_math) + || ! FLOAT_MODE_P (mode) || flag_unsafe_math_optimizations) && op1 == CONST0_RTX (mode) && ! side_effects_p (op0)) return op1; @@ -1260,19 +1260,18 @@ simplify_binary_operation (code, mode, op0, op1) /* In IEEE floating point, 0/x is not always 0. */ if ((TARGET_FLOAT_FORMAT != IEEE_FLOAT_FORMAT - || ! FLOAT_MODE_P (mode) || flag_fast_math) + || ! FLOAT_MODE_P (mode) || flag_unsafe_math_optimizations) && op0 == CONST0_RTX (mode) && ! side_effects_p (op1)) return op0; #if ! defined (REAL_IS_NOT_DOUBLE) || defined (REAL_ARITHMETIC) /* Change division by a constant into multiplication. Only do - this with -ffast-math until an expert says it is safe in - general. */ + this with -funsafe-math-optimizations. */ else if (GET_CODE (op1) == CONST_DOUBLE && GET_MODE_CLASS (GET_MODE (op1)) == MODE_FLOAT && op1 != CONST0_RTX (mode) - && flag_fast_math) + && flag_unsafe_math_optimizations) { REAL_VALUE_TYPE d; REAL_VALUE_FROM_CONST_DOUBLE (d, op1); @@ -1803,17 +1802,18 @@ simplify_relational_operation (code, mode, op0, op1) return simplify_relational_operation (signed_condition (code), mode, tem, const0_rtx); - if (flag_fast_math && code == ORDERED) + if (flag_unsafe_math_optimizations && code == ORDERED) return const_true_rtx; - if (flag_fast_math && code == UNORDERED) + if (flag_unsafe_math_optimizations && code == UNORDERED) return const0_rtx; /* For non-IEEE floating-point, if the two operands are equal, we know the result. */ if (rtx_equal_p (op0, op1) && (TARGET_FLOAT_FORMAT != IEEE_FLOAT_FORMAT - || ! FLOAT_MODE_P (GET_MODE (op0)) || flag_fast_math)) + || ! FLOAT_MODE_P (GET_MODE (op0)) + || flag_unsafe_math_optimizations)) equal = 1, op0lt = 0, op0ltu = 0, op1lt = 0, op1ltu = 0; /* If the operands are floating-point constants, see if we can fold @@ -2082,12 +2082,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_fast_math) + && (! FLOAT_MODE_P (mode) || flag_unsafe_math_optimizations) && 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_fast_math) + && (! FLOAT_MODE_P (mode) || flag_unsafe_math_optimizations) && rtx_equal_p (XEXP (op0, 1), op1) && rtx_equal_p (XEXP (op0, 0), op2)) return op2; |