dce: Don't dead-code delete separately wrapped restores
authorSegher Boessenkool <segher@kernel.crashing.org>
Wed, 12 Oct 2016 15:21:38 +0000 (17:21 +0200)
committerSegher Boessenkool <segher@gcc.gnu.org>
Wed, 12 Oct 2016 15:21:38 +0000 (17:21 +0200)
commitaab648a9fcf8c222ab43612915d11b093e11849d
treec04c19ce683616d0ce012f90a973edb86373e8a4
parent20a6ece021473dc7f182b751bcbdaa6ad9762375
dce: Don't dead-code delete separately wrapped restores

If there is a separately wrapped register restore on some path that
is dead (say, control goes into an endless loop after it), then we
cannot delete that restore because that would confuse the DWARF CFI
(if there is another path joining).
This happens with gcc.dg/torture/pr53168.c, for example.

* dce.c (delete_unmarked_insns): Don't delete instructions with
a REG_CFA_RESTORE note.

From-SVN: r241060
gcc/ChangeLog
gcc/dce.c