On Tue, Mar 28, 2023 at 12:43:34PM +0000, Richard Biener wrote: > When forwprop simplifies the CFG the 2nd order opportunities by > exposed degenerate PHIs are not realized. The following improves > this by properly tracking executable edges and thus handling this > for non-cyclic CFGs at least. > > This avoids the bogus diagnostic reported for the testcase in this PR. > > Bootstrapped and tested on x86_64-unknown-linux-gnu. > > OK? > > Thanks, > Richard. > > PR tree-optimization/107087 > * tree-ssa-forwprop.cc (pass_forwprop::execute): Track > executable regions to avoid useless work and to better > propagate degenerate PHIs. > > * testsuite/g++.dg/pr107087.C: New testcase.
LGTM. Jakub