]> git.ipfire.org Git - thirdparty/gcc.git/commit
tree-optimization/107087 - missed CCP after forwprop
authorRichard Biener <rguenther@suse.de>
Mon, 27 Mar 2023 13:18:41 +0000 (15:18 +0200)
committerRichard Biener <rguenther@suse.de>
Tue, 28 Mar 2023 13:25:01 +0000 (15:25 +0200)
commit2b9d76c1af189b918a9970f471e6d2e2c08f7e7d
tree5685f17e15f19ac89f91cd869b89755a267a9717
parente70e36cbef4f01e7d32bafe17698c3bf3e4624b8
tree-optimization/107087 - missed CCP after forwprop

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.

PR tree-optimization/107087
* tree-ssa-forwprop.cc (pass_forwprop::execute): Track
executable regions to avoid useless work and to better
propagate degenerate PHIs.

* g++.dg/pr107087.C: New testcase.
gcc/testsuite/g++.dg/pr107087.C [new file with mode: 0644]
gcc/tree-ssa-forwprop.cc