When lra-remat rematerializes an instruction with a clobber, it checks
commitc42d7ef725a8a6418ee7a1110e37376423870dd6
authorwilco <wilco@138bc75d-0d04-0410-961f-82ee72b054a4>
Wed, 24 May 2017 17:06:55 +0000 (24 17:06 +0000)
committerwilco <wilco@138bc75d-0d04-0410-961f-82ee72b054a4>
Wed, 24 May 2017 17:06:55 +0000 (24 17:06 +0000)
tree3947dcce7024d126e21371e663b2a9aa5f9c6d78
parentd10e0468f3a05144dbe359e3323e6898d15b5b7a
When lra-remat rematerializes an instruction with a clobber, it checks
that the clobber does not kill live registers.  However it fails to check
that the clobber also doesn't overlap with the destination register of the
final rematerialized instruction.  As a result it is possible to generate
illegal instructions with the same hard register as the destination and a
clobber.  Fix this by also checking for overlaps with the destination
register.

    gcc/
PR rtl-optimization/80754
* lra-remat.c (do_remat): Add overlap checks for dst_regno.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@248424 138bc75d-0d04-0410-961f-82ee72b054a4
gcc/ChangeLog
gcc/lra-remat.c