aboutsummaryrefslogtreecommitdiff
path: root/gcc/cse.c
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/cse.c')
-rw-r--r--gcc/cse.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/gcc/cse.c b/gcc/cse.c
index ac9ae6b..17d35ce 100644
--- a/gcc/cse.c
+++ b/gcc/cse.c
@@ -3234,6 +3234,12 @@ find_comparison_args (code, parg1, parg2, pmode1, pmode2)
if (x == 0)
break;
+ /* If we need to reverse the comparison, make sure that that is
+ possible -- we can't necessarily infer the value of GE from LT
+ with floating-point operands. */
+ if (reverse_code && ! can_reverse_comparison_p (x, NULL_RTX))
+ break;
+
arg1 = XEXP (x, 0), arg2 = XEXP (x, 1);
if (GET_RTX_CLASS (GET_CODE (x)) == '<')
code = GET_CODE (x);