Commit 434c87d4 by Jan Hubicka Committed by Jan Hubicka

* combine.c (combine_simplify_rtx): Use reversed_comparison_code_parts.

From-SVN: r62246
parent 271bd540
Sat Feb 1 14:14:40 CET 2003 Jan Hubicka <jh@suse.cz>
* combine.c (combine_simplify_rtx): Use reversed_comparison_code_parts.
2003-02-01 Richard Sandiford <rsandifo@redhat.com> 2003-02-01 Richard Sandiford <rsandifo@redhat.com>
* flags.h (flag_volatile): Remove declaration. * flags.h (flag_volatile): Remove declaration.
......
...@@ -3708,6 +3708,8 @@ combine_simplify_rtx (x, op0_mode, last, in_dest) ...@@ -3708,6 +3708,8 @@ combine_simplify_rtx (x, op0_mode, last, in_dest)
if (general_operand (true_rtx, VOIDmode) if (general_operand (true_rtx, VOIDmode)
&& general_operand (false_rtx, VOIDmode)) && general_operand (false_rtx, VOIDmode))
{ {
enum rtx_code reversed;
/* Restarting if we generate a store-flag expression will cause /* Restarting if we generate a store-flag expression will cause
us to loop. Just drop through in this case. */ us to loop. Just drop through in this case. */
...@@ -3716,9 +3718,10 @@ combine_simplify_rtx (x, op0_mode, last, in_dest) ...@@ -3716,9 +3718,10 @@ combine_simplify_rtx (x, op0_mode, last, in_dest)
if (true_rtx == const_true_rtx && false_rtx == const0_rtx) if (true_rtx == const_true_rtx && false_rtx == const0_rtx)
x = gen_binary (cond_code, mode, cond, cop1); x = gen_binary (cond_code, mode, cond, cop1);
else if (true_rtx == const0_rtx && false_rtx == const_true_rtx else if (true_rtx == const0_rtx && false_rtx == const_true_rtx
&& reverse_condition (cond_code) != UNKNOWN) && ((reversed = reversed_comparison_code_parts
x = gen_binary (reverse_condition (cond_code), (cond_code, cond, cop1, NULL))
mode, cond, cop1); != UNKNOWN))
x = gen_binary (reversed, mode, cond, cop1);
/* Likewise, we can make the negate of a comparison operation /* Likewise, we can make the negate of a comparison operation
if the result values are - STORE_FLAG_VALUE and zero. */ if the result values are - STORE_FLAG_VALUE and zero. */
...@@ -3731,11 +3734,13 @@ combine_simplify_rtx (x, op0_mode, last, in_dest) ...@@ -3731,11 +3734,13 @@ combine_simplify_rtx (x, op0_mode, last, in_dest)
mode); mode);
else if (GET_CODE (false_rtx) == CONST_INT else if (GET_CODE (false_rtx) == CONST_INT
&& INTVAL (false_rtx) == - STORE_FLAG_VALUE && 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, x = simplify_gen_unary (NEG, mode,
gen_binary (reverse_condition gen_binary (reversed, mode,
(cond_code), cond, cop1),
mode, cond, cop1),
mode); mode);
else else
return gen_rtx_IF_THEN_ELSE (mode, return gen_rtx_IF_THEN_ELSE (mode,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment