summaryrefslogtreecommitdiff
path: root/gcc/optabs.c
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/optabs.c')
-rw-r--r--gcc/optabs.c9
1 files changed, 4 insertions, 5 deletions
diff --git a/gcc/optabs.c b/gcc/optabs.c
index e69b4a1756e..dd0c51c16f7 100644
--- a/gcc/optabs.c
+++ b/gcc/optabs.c
@@ -3175,15 +3175,14 @@ emit_conditional_move (target, code, op0, op1, cmode, op2, op3, mode,
if (cmode == VOIDmode)
cmode = GET_MODE (op0);
- if ((CONSTANT_P (op2) && ! CONSTANT_P (op3))
- || (GET_CODE (op2) == CONST_INT && GET_CODE (op3) != CONST_INT))
+ if (((CONSTANT_P (op2) && ! CONSTANT_P (op3))
+ || (GET_CODE (op2) == CONST_INT && GET_CODE (op3) != CONST_INT))
+ && (GET_MODE_CLASS (GET_MODE (op1)) != MODE_FLOAT
+ || TARGET_FLOAT_FORMAT != IEEE_FLOAT_FORMAT || flag_fast_math))
{
tem = op2;
op2 = op3;
op3 = tem;
- /* ??? This may not be appropriate (consider IEEE). Perhaps we should
- call can_reverse_comparison_p here and bail out if necessary.
- It's not clear whether we need to do this canonicalization though. */
code = reverse_condition (code);
}