diff options
author | John Wehle <john@feith.com> | 2001-12-05 05:47:36 +0000 |
---|---|---|
committer | John Wehle <wehle@gcc.gnu.org> | 2001-12-05 05:47:36 +0000 |
commit | 52488da14f26e9df50958f19d3d6f72b44bb7206 (patch) | |
tree | ab8e7d78c735260db81c354ad6ada82224f8c855 /gcc | |
parent | 32a6f30e69f5044b5718c0c30b3a86eb94a2e8ec (diff) | |
download | gcc-52488da14f26e9df50958f19d3d6f72b44bb7206.zip gcc-52488da14f26e9df50958f19d3d6f72b44bb7206.tar.gz gcc-52488da14f26e9df50958f19d3d6f72b44bb7206.tar.bz2 |
emit-rtl.c (set_unique_reg_note): Don't set a REG_EQUAL or REG_EQUIV note if multiple sets are present.
* emit-rtl.c (set_unique_reg_note): Don't set
a REG_EQUAL or REG_EQUIV note if multiple sets
are present.
From-SVN: r47657
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/ChangeLog | 6 | ||||
-rw-r--r-- | gcc/emit-rtl.c | 29 |
2 files changed, 30 insertions, 5 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 2dd1ca4..1eb92922 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,9 @@ +Wed Dec 5 00:42:16 EST 2001 John Wehle (john@feith.com) + + * emit-rtl.c (set_unique_reg_note): Don't set + a REG_EQUAL or REG_EQUIV note if multiple sets + are present. + 2001-12-04 John David Anglin <dave@hiauly1.hia.nrc.ca> * cfgrtl.c (verify_flow_info): Allow jump table data in fallthru if diff --git a/gcc/emit-rtl.c b/gcc/emit-rtl.c index 3c2d847..6a30769 100644 --- a/gcc/emit-rtl.c +++ b/gcc/emit-rtl.c @@ -4068,11 +4068,30 @@ set_unique_reg_note (insn, kind, datum) { rtx note = find_reg_note (insn, kind, NULL_RTX); - /* Don't add ASM_OPERAND REG_EQUAL/REG_EQUIV notes. - It serves no useful purpose and breaks eliminate_regs. */ - if ((kind == REG_EQUAL || kind == REG_EQUIV) - && GET_CODE (datum) == ASM_OPERANDS) - return NULL_RTX; + switch (kind) + { + case REG_EQUAL: + case REG_EQUIV: + /* Don't add REG_EQUAL/REG_EQUIV notes if the insn + has multiple sets (some callers assume single_set + means the insn only has one set, when in fact it + means the insn only has one * useful * set). */ + if (GET_CODE (PATTERN (insn)) == PARALLEL && multiple_sets (insn)) + { + if (note) + abort (); + return NULL_RTX; + } + + /* Don't add ASM_OPERAND REG_EQUAL/REG_EQUIV notes. + It serves no useful purpose and breaks eliminate_regs. */ + if (GET_CODE (datum) == ASM_OPERANDS) + return NULL_RTX; + break; + + default: + break; + } if (note) { |