https://gcc.gnu.org/bugzilla/show_bug.cgi?id=98024
--- Comment #4 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:b6a7b72c6c91cc0d800a603a59e96fbcb07793ba commit r11-5494-gb6a7b72c6c91cc0d800a603a59e96fbcb07793ba Author: Richard Biener <rguent...@suse.de> Date: Fri Nov 27 12:01:25 2020 +0100 tree-optimization/98024 - fix rnflow regression The change to make PRE insertion iterate less had a typo in checking successors RPO state. Fixing this exposes that regular PRE insertion when facing a value that is the same on all edges inserts an assignment in place of a PHI node but fails to set up things so that this insertion is not repeated (it correctly does not return 'new_stuff'). But with the new iteration scheme this causes us to repeatedly insert such assignment and change AVAIL_OUT over to the newly inserted expression. The fix is to treat this as PHI and insert into PHI_GEN, avoiding repetitive insertion. 2020-11-27 Richard Biener <rguent...@suse.de> PR tree-optimization/98024 * tree-ssa-pre.c (insert): Fix successor RPO order check. (do_pre_regular_insertion): When inserting an assignment in place of an all-same-value PHI still record that into PHI_GEN.