https://gcc.gnu.org/bugzilla/show_bug.cgi?id=106234
--- Comment #4 from CVS Commits <cvs-commit at gcc dot gnu.org> --- The master branch has been updated by Andrew Macleod <amacl...@gcc.gnu.org>: https://gcc.gnu.org/g:12a9b98ac574bc8092a75849b5c462135d35c31d commit r13-1608-g12a9b98ac574bc8092a75849b5c462135d35c31d Author: Andrew MacLeod <amacl...@redhat.com> Date: Fri Jul 8 13:30:49 2022 -0400 Avoid calling range_from_dom when dominator is already resolved. range_from_dom makes a recursive call to resolve the immediate dominator when there are multiple incoming edges to a block. This is not necessary when the dominator already has an on-entry cache value. PR tree-optimization/106234 * gimple-range-cache.cc (ranger_cache::range_from_dom): Check dominator cache value before recursively resolving it.