Commit dc2698bc by Jan Hubicka Committed by Jan Hubicka

ifcvt.c (noce_emit_store_flag, [...]): Use reversed_comparison_code instead of…

ifcvt.c (noce_emit_store_flag, [...]): Use reversed_comparison_code instead of reverse_comparison and...

	* ifcvt.c (noce_emit_store_flag, noce_try_store_flag_constants,
	noce_try_store_flag_inc, noce_try_store_flag_mask,
	noce_try_cmove_arith):
	Use reversed_comparison_code instead of reverse_comparison and
	can_reverse_comparison_p.

From-SVN: r40119
parent 2450703c
Wed Feb 28 17:19:28 CET 2001 Jan Hubicka <jh@suse.cz.
* ifcvt.c (noce_emit_store_flag, noce_try_store_flag_constants,
noce_try_store_flag_inc, noce_try_store_flag_mask,
noce_try_cmove_arith):
Use reversed_comparison_code instead of reverse_comparison and
can_reverse_comparison_p.
Wed Feb 28 17:17:29 CET 2001 Jan Hubicka <jh@suse.cz>
* jump.c (reversed_comparison_code_parts): Allow reversal of
......
......@@ -496,15 +496,16 @@ noce_emit_store_flag (if_info, x, reversep, normalize)
if (cond_complex)
cond = XEXP (SET_SRC (pc_set (if_info->jump)), 0);
if (reversep)
code = reversed_comparison_code (cond, if_info->jump);
else
code = GET_CODE (cond);
if ((if_info->cond_earliest == if_info->jump || cond_complex)
&& (normalize == 0 || STORE_FLAG_VALUE == normalize))
{
rtx tmp;
code = GET_CODE (cond);
if (reversep)
code = reverse_condition (code);
tmp = gen_rtx_fmt_ee (code, GET_MODE (x), XEXP (cond, 0),
XEXP (cond, 1));
tmp = gen_rtx_SET (VOIDmode, x, tmp);
......@@ -530,10 +531,6 @@ noce_emit_store_flag (if_info, x, reversep, normalize)
if (cond_complex)
return NULL_RTX;
code = GET_CODE (cond);
if (reversep)
code = reverse_condition (code);
return emit_store_flag (x, code, XEXP (cond, 0),
XEXP (cond, 1), VOIDmode,
(code == LTU || code == LEU
......@@ -560,7 +557,8 @@ noce_try_store_flag (if_info)
else if (if_info->b == const0_rtx
&& GET_CODE (if_info->a) == CONST_INT
&& INTVAL (if_info->a) == STORE_FLAG_VALUE
&& can_reverse_comparison_p (if_info->cond, if_info->jump))
&& (reversed_comparison_code (if_info->cond, if_info->jump)
!= UNKNOWN))
reversep = 1;
else
return FALSE;
......@@ -605,7 +603,8 @@ noce_try_store_flag_constants (if_info)
itrue = INTVAL (if_info->b);
diff = itrue - ifalse;
can_reverse = can_reverse_comparison_p (if_info->cond, if_info->jump);
can_reverse = (reversed_comparison_code (if_info->cond, if_info->jump)
!= UNKNOWN);
reversep = 0;
if (diff == STORE_FLAG_VALUE || diff == -STORE_FLAG_VALUE)
......@@ -729,7 +728,8 @@ noce_try_store_flag_inc (if_info)
&& (XEXP (if_info->a, 1) == const1_rtx
|| XEXP (if_info->a, 1) == constm1_rtx)
&& rtx_equal_p (XEXP (if_info->a, 0), if_info->x)
&& can_reverse_comparison_p (if_info->cond, if_info->jump))
&& (reversed_comparison_code (if_info->cond, if_info->jump)
!= UNKNOWN))
{
if (STORE_FLAG_VALUE == INTVAL (XEXP (if_info->a, 1)))
subtract = 0, normalize = 0;
......@@ -785,8 +785,9 @@ noce_try_store_flag_mask (if_info)
|| STORE_FLAG_VALUE == -1)
&& ((if_info->a == const0_rtx
&& rtx_equal_p (if_info->b, if_info->x))
|| ((reversep = can_reverse_comparison_p (if_info->cond,
if_info->jump))
|| ((reversep = (reversed_comparison_code (if_info->cond,
if_info->jump)
!= UNKNOWN))
&& if_info->b == const0_rtx
&& rtx_equal_p (if_info->a, if_info->x))))
{
......@@ -964,7 +965,7 @@ noce_try_cmove_arith (if_info)
insn_b = if_info->insn_b;
/* Possibly rearrange operands to make things come out more natural. */
if (can_reverse_comparison_p (if_info->cond, if_info->jump))
if (reversed_comparison_code (if_info->cond, if_info->jump) != UNKNOWN)
{
int reversep = 0;
if (rtx_equal_p (b, x))
......@@ -974,7 +975,7 @@ noce_try_cmove_arith (if_info)
if (reversep)
{
code = reverse_condition (code);
code = reversed_comparison_code (if_info->cond, if_info->jump);
tmp = a, a = b, b = tmp;
tmp = insn_a, insn_a = insn_b, insn_b = tmp;
}
......
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