summaryrefslogtreecommitdiff
path: root/gcc/combine.c
diff options
context:
space:
mode:
authorhubicka <hubicka@138bc75d-0d04-0410-961f-82ee72b054a4>2003-02-01 13:16:29 +0000
committerhubicka <hubicka@138bc75d-0d04-0410-961f-82ee72b054a4>2003-02-01 13:16:29 +0000
commitb0bb73953d6ad761e985395103b13e1606a68b28 (patch)
treecaf6da448f14a24291c429a078aa69f184ca1c21 /gcc/combine.c
parentc1771f2c27753526ee0039d8781f85b88c38dcd6 (diff)
downloadgcc-b0bb73953d6ad761e985395103b13e1606a68b28.tar.gz
* combine.c (combine_simplify_rtx): Use reversed_comparison_code_parts.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@62246 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/combine.c')
-rw-r--r--gcc/combine.c19
1 files changed, 12 insertions, 7 deletions
diff --git a/gcc/combine.c b/gcc/combine.c
index d3203fe5a49..d6915c15178 100644
--- a/gcc/combine.c
+++ b/gcc/combine.c
@@ -3708,6 +3708,8 @@ combine_simplify_rtx (x, op0_mode, last, in_dest)
if (general_operand (true_rtx, VOIDmode)
&& general_operand (false_rtx, VOIDmode))
{
+ enum rtx_code reversed;
+
/* Restarting if we generate a store-flag expression will cause
us to loop. Just drop through in this case. */
@@ -3716,9 +3718,10 @@ combine_simplify_rtx (x, op0_mode, last, in_dest)
if (true_rtx == const_true_rtx && false_rtx == const0_rtx)
x = gen_binary (cond_code, mode, cond, cop1);
else if (true_rtx == const0_rtx && false_rtx == const_true_rtx
- && reverse_condition (cond_code) != UNKNOWN)
- x = gen_binary (reverse_condition (cond_code),
- mode, cond, cop1);
+ && ((reversed = reversed_comparison_code_parts
+ (cond_code, cond, cop1, NULL))
+ != UNKNOWN))
+ x = gen_binary (reversed, mode, cond, cop1);
/* Likewise, we can make the negate of a comparison operation
if the result values are - STORE_FLAG_VALUE and zero. */
@@ -3731,11 +3734,13 @@ combine_simplify_rtx (x, op0_mode, last, in_dest)
mode);
else if (GET_CODE (false_rtx) == CONST_INT
&& INTVAL (false_rtx) == - STORE_FLAG_VALUE
- && true_rtx == const0_rtx)
+ && true_rtx == const0_rtx
+ && ((reversed = reversed_comparison_code_parts
+ (cond_code, cond, cop1, NULL))
+ != UNKNOWN))
x = simplify_gen_unary (NEG, mode,
- gen_binary (reverse_condition
- (cond_code),
- mode, cond, cop1),
+ gen_binary (reversed, mode,
+ cond, cop1),
mode);
else
return gen_rtx_IF_THEN_ELSE (mode,