middle-end/93273 - fix sinking clobbers across backedges
authorRichard Biener <rguenther@suse.de>
Wed, 15 Jan 2020 12:29:25 +0000 (13:29 +0100)
committerRichard Biener <rguenther@suse.de>
Wed, 15 Jan 2020 14:40:51 +0000 (15:40 +0100)
commit37e27de43133b87ceb529d863f0d1f54d87cf2d8
treea222548477cde34a8d48a9227f5f04b1853ef429
parenta52d93219c63d38fa9a97d0eb727e7fcc935e9b3
middle-end/93273 - fix sinking clobbers across backedges

The previous work to fix PR93199 didn't take into account backedges
when defering insertion.  The following simply avoids to defer in that
case since we know we'll not take secondary opportunities there.

2020-01-15  Richard Biener  <rguenther@suse.de>

        PR middle-end/93273
        * tree-eh.c (sink_clobbers): If we already visited the destination
        block do not defer insertion.
        (pass_lower_eh_dispatch::execute): Maintain BB_VISITED for
        the purpose of defered insertion.

* g++.dg/torture/pr93273.C: New testcase.
gcc/ChangeLog
gcc/testsuite/ChangeLog
gcc/testsuite/g++.dg/torture/pr93273.C [new file with mode: 0644]
gcc/tree-eh.c