Commit 33f77355 by Denis Chertykov Committed by Denis Chertykov

avr.c (out_tsthi,out_tstsi): Test simplification bug fixed.

	* config/avr/avr.c (out_tsthi,out_tstsi): Test simplification bug
	fixed.
	(machine_dependent_reorg): Wrong optimization based on
	NOTICE_UPDATE_CC removed.

From-SVN: r37715
parent 692dc9c6
Fri Nov 24 22:37:41 2000 Denis Chertykov <denisc@overta.ru>
* config/avr/avr.c (out_tsthi,out_tstsi): Test simplification bug
fixed.
(machine_dependent_reorg): Wrong optimization based on
NOTICE_UPDATE_CC removed.
Fri Nov 24 19:48:09 2000 J"orn Rennecke <amylaar@redhat.com> Fri Nov 24 19:48:09 2000 J"orn Rennecke <amylaar@redhat.com>
* jump.c (delete_computation): Re-instate deletion of feeding insn. * jump.c (delete_computation): Re-instate deletion of feeding insn.
......
...@@ -2650,7 +2650,7 @@ out_tsthi (insn, l) ...@@ -2650,7 +2650,7 @@ out_tsthi (insn, l)
rtx insn; rtx insn;
int *l; int *l;
{ {
if (!compare_eq_p (insn)) if (!compare_eq_p (insn) && !compare_diff_p (insn))
{ {
if (l) *l = 1; if (l) *l = 1;
return AS1 (tst,%B0); return AS1 (tst,%B0);
...@@ -2679,7 +2679,7 @@ out_tstsi (insn, l) ...@@ -2679,7 +2679,7 @@ out_tstsi (insn, l)
rtx insn; rtx insn;
int *l; int *l;
{ {
if (!compare_eq_p (insn)) if (!compare_eq_p (insn) && !compare_diff_p(insn))
{ {
if (l) *l = 1; if (l) *l = 1;
return AS1 (tst,%D0); return AS1 (tst,%D0);
...@@ -4932,20 +4932,17 @@ machine_dependent_reorg (first_insn) ...@@ -4932,20 +4932,17 @@ machine_dependent_reorg (first_insn)
rtx first_insn; rtx first_insn;
{ {
rtx insn, pattern; rtx insn, pattern;
CC_STATUS_INIT;
for (insn = first_insn; insn; insn = NEXT_INSN (insn)) for (insn = first_insn; insn; insn = NEXT_INSN (insn))
{ {
if (! (insn == 0 || GET_CODE (insn) == INSN if (! (GET_CODE (insn) == INSN
|| GET_CODE (insn) == CALL_INSN || GET_CODE (insn) == JUMP_INSN) || GET_CODE (insn) == CALL_INSN
|| GET_CODE (insn) == JUMP_INSN)
|| !single_set (insn)) || !single_set (insn))
continue; continue;
pattern = PATTERN (insn); pattern = PATTERN (insn);
cc_prev_status = cc_status;
NOTICE_UPDATE_CC (pattern, insn);
if (GET_CODE (pattern) == PARALLEL) if (GET_CODE (pattern) == PARALLEL)
pattern = XVECEXP (pattern, 0, 0); pattern = XVECEXP (pattern, 0, 0);
if (GET_CODE (pattern) == SET if (GET_CODE (pattern) == SET
...@@ -4997,16 +4994,12 @@ machine_dependent_reorg (first_insn) ...@@ -4997,16 +4994,12 @@ machine_dependent_reorg (first_insn)
rtx src = SET_SRC (pat); rtx src = SET_SRC (pat);
rtx t = XEXP (src,0); rtx t = XEXP (src,0);
if (!(cc_prev_status.value1 != 0 && cc_status.value1 != 0 PUT_CODE (t, swap_condition (GET_CODE (t)));
&& rtx_equal_p (cc_status.value1, cc_prev_status.value1))) SET_SRC (pattern) = gen_rtx (NEG,
{ GET_MODE (SET_SRC (pattern)),
PUT_CODE (t, swap_condition (GET_CODE (t))); SET_SRC (pattern));
SET_SRC (pattern) = gen_rtx (NEG, INSN_CODE (next) = -1;
GET_MODE (SET_SRC (pattern)), INSN_CODE (insn) = -1;
SET_SRC (pattern));
INSN_CODE (next) = -1;
INSN_CODE (insn) = -1;
}
} }
} }
} }
......
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