https://gcc.gnu.org/bugzilla/show_bug.cgi?id=79125
Jeffrey A. Law <law at redhat dot com> changed: What |Removed |Added ---------------------------------------------------------------------------- Priority|P3 |P2 Status|UNCONFIRMED |NEW Last reconfirmed| |2017-01-19 CC| |law at redhat dot com Ever confirmed|0 |1 --- Comment #2 from Jeffrey A. Law <law at redhat dot com> --- So in this case the conditional trap is in BB2 and is turned into an unconditional trap by local cprop. Note the code that currently scans for traps skips BB2 (no global cprop can happen in that block). It also ignores insns that are unconditional traps at the start of the global pass. local_cprop_pass ought to be able to see every possible conditional during its scan. Put those onto a worklist. After the global pass is done, walk the worklist. If the entry on the list is an unconditional trap and its containing block has any successors, then we need to split after the trap and insert the barrier. It means a bit more worklist scanning, since we'll put all traps (conditional or unconditional) on the list. But that ought to be in the noise relative to everything else going on. Bernd, you want to take this one? I've got a ppc64 beaker box handy for additional testing once you've got a patch.