s390.c (s390_z10_optimize_cmp): Skip notes and debug insns when investigating previous or next insns.

2009-10-19  Andreas Krebbel  <Andreas.Krebbel@de.ibm.com>

	* config/s390/s390.c (s390_z10_optimize_cmp): Skip notes and debug
	insns when investigating previous or next insns.

From-SVN: r152980
This commit is contained in:
Andreas Krebbel 2009-10-19 15:48:01 +00:00 committed by Andreas Krebbel
parent 82c7452fb9
commit ae3efc3166
2 changed files with 7 additions and 2 deletions

View File

@ -1,3 +1,8 @@
2009-10-19 Andreas Krebbel <Andreas.Krebbel@de.ibm.com>
* config/s390/s390.c (s390_z10_optimize_cmp): Skip notes and debug
insns when investigating previous or next insns.
2009-10-19 Jakub Jelinek <jakub@redhat.com>
Backport from mainline:

View File

@ -9801,7 +9801,7 @@ s390_z10_optimize_cmp (rtx insn)
/* Swap the COMPARE arguments and its mask if there is a
conflicting access in the previous insn. */
prev_insn = PREV_INSN (insn);
prev_insn = prev_active_insn (insn);
if (prev_insn != NULL_RTX && INSN_P (prev_insn)
&& reg_referenced_p (*op1, PATTERN (prev_insn)))
s390_swap_cmp (cond, op0, op1, insn);
@ -9812,7 +9812,7 @@ s390_z10_optimize_cmp (rtx insn)
the operands, or if swapping them would cause a conflict
with the previous insn, issue a NOP after the COMPARE in
order to separate the two instuctions. */
next_insn = NEXT_INSN (insn);
next_insn = next_active_insn (insn);
if (next_insn != NULL_RTX && INSN_P (next_insn)
&& s390_non_addr_reg_read_p (*op1, next_insn))
{