combine: Fix bug in giving up placing REG_DEAD notes (PR82683)
When we have a REG_DEAD note for a reg that is set in the new I2, we
drop the note on the floor (we cannot find whether to place it on I2
or on I3). But the code I added to do this has a bug and does not
always actually drop it. This patch fixes it.
But that on its own is too pessimistic, it turns out, and we generate
worse code. One case where we do know where to place the note is if
it came from I3 (it should go to I3 again). Doing this fixes all of
the regressions.
PR rtl-optimization/64682
PR rtl-optimization/69567
PR rtl-optimization/69737
PR rtl-optimization/82683
* combine.c (distribute_notes) <REG_DEAD>: If the new I2 sets the same
register mentioned in the note, drop the note, unless it came from I3,
in which case it should go to I3 again.
From-SVN: r254315