diff options
author | Richard Henderson <rth@cygnus.com> | 1999-03-25 08:54:31 -0800 |
---|---|---|
committer | Richard Henderson <rth@gcc.gnu.org> | 1999-03-25 08:54:31 -0800 |
commit | e55b44863607ba6b2b370f6128a4d423d1a17aee (patch) | |
tree | da3b123547f3d3f2fe8e620677ebc2c507c18920 /gcc | |
parent | cc29143343f0b7dc59c9d0f8399ac1135e947b0c (diff) | |
download | gcc-e55b44863607ba6b2b370f6128a4d423d1a17aee.zip gcc-e55b44863607ba6b2b370f6128a4d423d1a17aee.tar.gz gcc-e55b44863607ba6b2b370f6128a4d423d1a17aee.tar.bz2 |
combine.c (distribute_notes): Place REG_LABEL also where REG_EQUAL indicates.
* combine.c (distribute_notes): Place REG_LABEL also where
REG_EQUAL indicates.
From-SVN: r25984
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/ChangeLog | 5 | ||||
-rw-r--r-- | gcc/combine.c | 25 |
2 files changed, 29 insertions, 1 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 839469c..bd79775 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,8 @@ +Thu Mar 25 16:53:53 1999 Richard Henderson <rth@cygnus.com> + + * combine.c (distribute_notes): Place REG_LABEL also where + REG_EQUAL indicates. + Thu Mar 25 12:46:37 1999 Jim Wilson <wilson@cygnus.com> * a29k/a29k.h (TARGET_SWITCHES): Add doc strings. diff --git a/gcc/combine.c b/gcc/combine.c index e0a162a..0b64a86 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. */ |