[PR80693] drop value of parallel SETs dropped by combine
commit28a5212f1ea4fdd24a8d6cabf2a175075ad291fb
authoraoliva <aoliva@138bc75d-0d04-0410-961f-82ee72b054a4>
Mon, 11 Dec 2017 22:36:07 +0000 (11 22:36 +0000)
committeraoliva <aoliva@138bc75d-0d04-0410-961f-82ee72b054a4>
Mon, 11 Dec 2017 22:36:07 +0000 (11 22:36 +0000)
tree154fb2776aa4536d105f810a07b6ca6d166a3744
parentdb67a692bec916219a05dba8ea82ba3513dbf750
[PR80693] drop value of parallel SETs dropped by combine

When combine drops a REG_UNUSED SET in a parallel, we have to clear
cached values, so that, even if the REGs remain used (e.g. because
they were referenced in the used SET_SRC), we will not use properties
of the dropped modified value as if they applied to the preserved
original one.

We fail to adjust REG_N_SETS.

for  gcc/ChangeLog

PR rtl-optimization/80693
PR rtl-optimization/81019
PR rtl-optimization/81020
* combine.c (distribute_notes): Reset any REG_UNUSED REGs that
are not mentioned in i3.  Place the REG_UNUSED note on i2,
possibly modified to REG_DEAD, if it did not originate in i3.

for  gcc/testsuite/ChangeLog

PR rtl-optimization/80693
PR rtl-optimization/81019
PR rtl-optimization/81020
* gcc.dg/pr80693.c: New.
* gcc.dg/pr81019.c: New.

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