On 03/15/2018 01:20 PM, Jakub Jelinek wrote:
> Hi!
> 
> The following testcase ICEs on s390x-linux, because we have 2 registers
> saved in prologue, but only one of them modified in one path and then
> both restored there; cprop_hardreg propagates the saving register into the
> REG_CFA_RESTORE insn, making it a noop move (we don't really need to restore
> it), and then RTL DCE removes the noop move and we ICE during dwarf2 pass,
> because of a CFI mismatch.
> 
> The following patch makes sure that such insns are not actually removed, but
> turned into a USE still holding the note, which is all we need for CFI.
> 
> Bootstrapped/regtested on x86_64-linux and i686-linux, ok for trunk?
> 
> 2018-03-15  Jakub Jelinek  <ja...@redhat.com>
> 
>       PR debug/84875
>       * dce.c (delete_unmarked_insns): Don't remove frame related noop moves
>       holding REG_CFA_RESTORE notes, instead turn them into a USE.
> 
>       * gcc.dg/pr84875.c: New test.
OK.
jeff

Reply via email to