https://gcc.gnu.org/bugzilla/show_bug.cgi?id=116848
--- Comment #2 from GCC Commits <cvs-commit at gcc dot gnu.org> --- The trunk branch has been updated by Andrew Pinski <pins...@gcc.gnu.org>: https://gcc.gnu.org/g:9c04112fdc221b0a337f88572dfef4caaca78349 commit r15-3914-g9c04112fdc221b0a337f88572dfef4caaca78349 Author: Andrew Pinski <quic_apin...@quicinc.com> Date: Thu Sep 26 05:55:58 2024 +0000 unswitch: Replace manual ondemand maybe_undef with ssa_name_maybe_undef_p/mark_ssa_maybe_undefs [PR116848] The ondemand maybe_undef that follows phis was added in r7-6427-g8b670f93ab1136 but then later ssa_name_maybe_undef_p/mark_ssa_maybe_undefs was added in r13-972-gbe2861fe8c527a. This moves the ondemand one to use mark_ssa_maybe_undefs/ssa_name_maybe_undef_p instead. Which itself will be faster since the mark_ssa_maybe_undefs is a walk based on the uses of undefined names (and only once) rather than a walk based on the def of ones which are more likely defined (and on demand). Even though the ondemand maybe_undef had some extra special cases, those won't make a big difference in most code. Bootstrapped and tested on x86_64-linux-gnu. PR tree-optimization/116848 gcc/ChangeLog: * tree-ssa-loop-unswitch.cc (tree_ssa_unswitch_loops): Call mark_ssa_maybe_undefs. (is_maybe_undefined): Call ssa_name_maybe_undef_p instead of ondemand undef. Signed-off-by: Andrew Pinski <quic_apin...@quicinc.com>