combine.c (simplify_comparison): Don't change `code' when can't reverse comparison.

* combine.c (simplify_comparison): Don't change `code' when
	can't reverse comparison.

From-SVN: r39007
This commit is contained in:
Geoffrey Keating 2001-01-14 10:39:49 +00:00 committed by Geoffrey Keating
parent fce7e199d5
commit aa6683f7f1
2 changed files with 16 additions and 5 deletions

View File

@ -1,3 +1,8 @@
2001-01-14 Geoffrey Keating <geoffk@redhat.com>
* combine.c (simplify_comparison): Don't change `code' when
can't reverse comparison.
2001-01-14 Richard Henderson <rth@redhat.com>
* rtlanal.c (computed_jump_p_1): Rename from jmp_uses_reg_or_mem;

View File

@ -10710,13 +10710,19 @@ simplify_comparison (code, pop0, pop1)
&& (STORE_FLAG_VALUE
& (((HOST_WIDE_INT) 1
<< (GET_MODE_BITSIZE (GET_MODE (op0)) - 1))))
&& (code == LT || (code == GE))))
&& (code == LT || code == GE)))
{
code = (code == LT || code == NE
? GET_CODE (op0) : combine_reversed_comparison_code (op0));
if (code != UNKNOWN)
enum rtx_code new_code;
if (code == LT || code == NE)
new_code = GET_CODE (op0);
else
new_code = combine_reversed_comparison_code (op0);
if (new_code != UNKNOWN)
{
op0 = tem, op1 = tem1;
code = new_code;
op0 = tem;
op1 = tem1;
continue;
}
}