https://gcc.gnu.org/bugzilla/show_bug.cgi?id=111397
--- Comment #3 from CVS Commits <cvs-commit at gcc dot gnu.org> --- The master branch has been updated by Richard Biener <rgue...@gcc.gnu.org>: https://gcc.gnu.org/g:92ea12ea99fce546772a40b7bbc2ea850db9b1be commit r14-3916-g92ea12ea99fce546772a40b7bbc2ea850db9b1be Author: Richard Biener <rguent...@suse.de> Date: Wed Sep 13 09:28:34 2023 +0200 tree-optimization/111397 - missed copy propagation involving abnormal dest The following extends the previous enhancement to copy propagation involving abnormals. We can easily replace abnormal uses by not abnormal uses and only need to preserve the abnormals in PHI arguments flowing in from abnormal edges. This changes the may_propagate_copy argument indicating we are not propagating into a PHI node to indicate whether we know we are not propagating into a PHI argument from an abnormal PHI instead. PR tree-optimization/111397 * tree-ssa-propagate.cc (may_propagate_copy): Change optional argument to specify whether the PHI destination doesn't flow in from an abnormal PHI. (propagate_value): Adjust. * tree-ssa-forwprop.cc (pass_forwprop::execute): Indicate abnormal PHI dest. * tree-ssa-sccvn.cc (eliminate_dom_walker::before_dom_children): Likewise. (process_bb): Likewise. * gcc.dg/uninit-pr111397.c: New testcase.