https://gcc.gnu.org/bugzilla/show_bug.cgi?id=51840
--- Comment #8 from Kai Tietz <ktietz at gcc dot gnu.org> --- (In reply to Richard Henderson from comment #7) > Why the check for PHI_WANTED? I must say the comment is less than > enlightening. Is there any drawback to just > > if (DECL_NONLOCAL (lbl) || FORCED_LABEL (lbl)) > > ? I tested at beginning condition '!DECL_ARTIFICIAL (lbl) && FORCED_LABEL (lbl)', and it bootstrapped fine. To use here just FORCED_LABEL would cause additional regressions due all labels in gimple have set this flsg if they their address is used (see gimpilify.c comments about setting this flag). The issue happens here only for the none-artificial labels marked as forced. If we don't check here for PHI_WANTED, then we get a regression in tree-ssa/pr18134.c. Well, if we are conservative, we have to avoid modification of user-labels, nevertheless we would cause weak user-code by allowing PHI_WANTED code-path too in mergephi pass.