aboutsummaryrefslogtreecommitdiff
path: root/gcc/simplify-rtx.c
diff options
context:
space:
mode:
authorJan Hubicka <jh@suse.cz>2001-01-08 16:16:40 +0100
committerJan Hubicka <hubicka@gcc.gnu.org>2001-01-08 15:16:40 +0000
commit261efdefd067fbb10979f662f9fe0a3da986d2b5 (patch)
tree3ffcebd198ac0745cfb083cc4d096b8c14b9273d /gcc/simplify-rtx.c
parent3febd12318b0cdef645012bbce9cf85e4e4d80ed (diff)
downloadgcc-261efdefd067fbb10979f662f9fe0a3da986d2b5.zip
gcc-261efdefd067fbb10979f662f9fe0a3da986d2b5.tar.gz
gcc-261efdefd067fbb10979f662f9fe0a3da986d2b5.tar.bz2
jump.c (jump_optimize_1): Use reversed_comparison_code instead of can_reverse_comparison_p.
* 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. From-SVN: r38802
Diffstat (limited to 'gcc/simplify-rtx.c')
-rw-r--r--gcc/simplify-rtx.c17
1 files changed, 12 insertions, 5 deletions
diff --git a/gcc/simplify-rtx.c b/gcc/simplify-rtx.c
index a3a1bfe..9b0f798 100644
--- a/gcc/simplify-rtx.c
+++ b/gcc/simplify-rtx.c
@@ -584,6 +584,7 @@ simplify_unary_operation (code, mode, op, op_mode)
eggert@twinsun.com says it is safe for IEEE also. */
else
{
+ enum rtx_code reversed;
/* There are some simplifications we can do even if the operands
aren't constant. */
switch (code)
@@ -595,8 +596,9 @@ simplify_unary_operation (code, mode, op, op_mode)
/* (not (eq X Y)) == (ne X Y), etc. */
if (mode == BImode && GET_RTX_CLASS (GET_CODE (op)) == '<'
- && can_reverse_comparison_p (op, NULL_RTX))
- return gen_rtx_fmt_ee (reverse_condition (GET_CODE (op)),
+ && ((reversed = reversed_comparison_code (op, NULL_RTX))
+ != UNKNOWN))
+ return gen_rtx_fmt_ee (reversed,
op_mode, XEXP (op, 0), XEXP (op, 1));
break;
@@ -2075,9 +2077,14 @@ simplify_ternary_operation (code, mode, op0_mode, op0, op1, op2)
if (t == STORE_FLAG_VALUE && f == 0)
code = GET_CODE (op0);
- else if (t == 0 && f == STORE_FLAG_VALUE
- && can_reverse_comparison_p (op0, NULL_RTX))
- code = reverse_condition (GET_CODE (op0));
+ else if (t == 0 && f == STORE_FLAG_VALUE)
+ {
+ enum rtx_code tmp;
+ tmp = reversed_comparison_code (op0, NULL_RTX);
+ if (tmp == UNKNOWN)
+ break;
+ code = tmp;
+ }
else
break;