summaryrefslogtreecommitdiff
path: root/gcc/cse.c
diff options
context:
space:
mode:
authorhubicka <hubicka@138bc75d-0d04-0410-961f-82ee72b054a4>2001-01-08 15:16:40 +0000
committerhubicka <hubicka@138bc75d-0d04-0410-961f-82ee72b054a4>2001-01-08 15:16:40 +0000
commit7da6ea0c19eced76e3a03249fdd03b59d92ed779 (patch)
tree3ffcebd198ac0745cfb083cc4d096b8c14b9273d /gcc/cse.c
parentc792eccc75dd19ef2ab0963a5087b74d290e1432 (diff)
downloadgcc-7da6ea0c19eced76e3a03249fdd03b59d92ed779.tar.gz
* jump.c (jump_optimize_1): Use reversed_comparison_code
instead of can_reverse_comparison_p. (jump_back_p): Likewise. (invert_exp_1): Likewise. (thread_jumps): Likewise. * simplify-rtx.c (simplify_unary_operation): Likewise. (simplify_ternary_operation): Likewise. * cse.c (find_comparison_args): Convert to use can_reverse_comparison_p. (record_jump_equiv): Likewise. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@38802 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/cse.c')
-rw-r--r--gcc/cse.c20
1 files changed, 10 insertions, 10 deletions
diff --git a/gcc/cse.c b/gcc/cse.c
index d6c2025a0c2..3d0f1a7658c 100644
--- a/gcc/cse.c
+++ b/gcc/cse.c
@@ -3251,15 +3251,16 @@ find_comparison_args (code, parg1, parg2, pmode1, pmode2)
/* 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);
-
if (reverse_code)
- code = reverse_condition (code);
+ {
+ enum rtx_code reversed = reversed_comparison_code (x, NULL_RTX);
+ if (reversed == UNKNOWN)
+ break;
+ else code = reversed;
+ }
+ else if (GET_RTX_CLASS (GET_CODE (x)) == '<')
+ code = GET_CODE (x);
+ arg1 = XEXP (x, 0), arg2 = XEXP (x, 1);
}
/* Return our results. Return the modes from before fold_rtx
@@ -4446,8 +4447,7 @@ record_jump_equiv (insn, taken)
code = find_comparison_args (code, &op0, &op1, &mode0, &mode1);
if (! cond_known_true)
{
- reversed_nonequality = (code != EQ && code != NE);
- code = reverse_condition (code);
+ code = reversed_comparison_code_parts (code, op0, op1, insn);
/* Don't remember if we can't find the inverse. */
if (code == UNKNOWN)