rtlanal: dead_or_set_regno_p should handle CLOBBER (PR83424)
authorSegher Boessenkool <segher@kernel.crashing.org>
Mon, 18 Dec 2017 20:16:19 +0000 (21:16 +0100)
committerSegher Boessenkool <segher@gcc.gnu.org>
Mon, 18 Dec 2017 20:16:19 +0000 (21:16 +0100)
commitaa8ec7fb260489a0af7578c727c4b41ebc1ae593
treebc3a5180cbac1a4b320897ff68c2487a50a04b1c
parentab6e54a684f6fcbf9eed989d170905fd889e19cc
rtlanal: dead_or_set_regno_p should handle CLOBBER (PR83424)

In PR83424 combine's move_deaths puts a REG_DEAD note in the wrong place
because dead_or_set_regno_p does not account for CLOBBER insns.  This
fixes it.

PR rtl-optimization/83424
* rtlanal.c (dead_or_set_regno_p): Handle CLOBBER just like SET.

gcc/testsuite/
PR rtl-optimization/83424
* gcc.dg/pr83424.c: New testsuite.

From-SVN: r255787
gcc/ChangeLog
gcc/rtlanal.c
gcc/testsuite/ChangeLog
gcc/testsuite/gcc.dg/pr83424.c [new file with mode: 0644]