PR rtl-optimization/29329
commitcf86e5cee072b19c09ee8e8c11726e71d23bed26
authorebotcazou <ebotcazou@138bc75d-0d04-0410-961f-82ee72b054a4>
Sun, 21 Jan 2007 22:32:39 +0000 (21 22:32 +0000)
committerebotcazou <ebotcazou@138bc75d-0d04-0410-961f-82ee72b054a4>
Sun, 21 Jan 2007 22:32:39 +0000 (21 22:32 +0000)
treea02be706edc515e25b0af6853ce327ff8283cda9
parentdb019aef86f8fd438b1e6c8d11411f4df6a0bf4d
PR rtl-optimization/29329
* combine.c (replaced_rhs_insn): Rename to i2mod.
(replaced_rhs_value): Rename to i2mod_new_rhs.
(i2mod_old_rhs): New global variable.
(combine_instructions): Adjust for above change.  Save a copy of
the old RHS into i2mod_old_rhs when the contents of a REG_EQUAL
note are substituted in the second instruction.
(distribute_notes) <REG_DEAD>: Adjust for above change.  Do not
ditch the note if it pertains to the second eliminated register
and this register is mentioned in i2mod_old_rhs.

Revert:
2006-09-12  Eric Botcazou  <ebotcazou@libertysurf.fr>

* combine.c (distribute_notes) <REG_DEAD>: Do not consider SETs past
the insn to which the note was originally attached.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@121037 138bc75d-0d04-0410-961f-82ee72b054a4
gcc/ChangeLog
gcc/combine.c
gcc/testsuite/ChangeLog
gcc/testsuite/gcc.c-torture/compile/20070121.c [new file with mode: 0644]