diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 839469c9d04f..bd7977526b91 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,8 @@ +Thu Mar 25 16:53:53 1999 Richard Henderson + + * combine.c (distribute_notes): Place REG_LABEL also where + REG_EQUAL indicates. + Thu Mar 25 12:46:37 1999 Jim Wilson * a29k/a29k.h (TARGET_SWITCHES): Add doc strings. diff --git a/gcc/combine.c b/gcc/combine.c index e0a162ac2b72..0b64a86a548c 100644 --- a/gcc/combine.c +++ b/gcc/combine.c @@ -11508,7 +11508,6 @@ distribute_notes (notes, from_insn, i3, i2, elim_i2, elim_i1) case REG_INC: case REG_NO_CONFLICT: - case REG_LABEL: /* These notes say something about how a register is used. They must be present on any use of the register in I2 or I3. */ if (reg_mentioned_p (XEXP (note, 0), PATTERN (i3))) @@ -11523,6 +11522,30 @@ distribute_notes (notes, from_insn, i3, i2, elim_i2, elim_i1) } break; + case REG_LABEL: + /* This can show up in several ways -- either directly in the + pattern, or hidden off in the constant pool with (or without?) + a REG_EQUAL note. */ + /* ??? Ignore the without-reg_equal-note problem for now. */ + if (reg_mentioned_p (XEXP (note, 0), PATTERN (i3)) + || ((tem = find_reg_note (i3, REG_EQUAL, NULL_RTX)) + && GET_CODE (XEXP (tem, 0)) == LABEL_REF + && XEXP (XEXP (tem, 0), 0) == XEXP (note, 0))) + place = i3; + + if (i2 + && (reg_mentioned_p (XEXP (note, 0), PATTERN (i2)) + || ((tem = find_reg_note (i2, REG_EQUAL, NULL_RTX)) + && GET_CODE (XEXP (tem, 0)) == LABEL_REF + && XEXP (XEXP (tem, 0), 0) == XEXP (note, 0)))) + { + if (place) + place2 = i2; + else + place = i2; + } + break; + case REG_WAS_0: /* It is too much trouble to try to see if this note is still correct in all situations. It is better to simply delete it. */