https://gcc.gnu.org/bugzilla/show_bug.cgi?id=127203
--- Comment #4 from GCC Commits <cvs-commit at gcc dot gnu.org> --- The master branch has been updated by Andrew Macleod <[email protected]>: https://gcc.gnu.org/g:cef3a8a6d6de57c166c09464db4d1cf3ce57fd1d commit r17-4710-gcef3a8a6d6de57c166c09464db4d1cf3ce57fd1d Author: Andrew MacLeod <[email protected]> Date: Fri Sep 18 19:25:48 2026 -0400 Handle inferred ranges like outgoing edges in range_cache. The current range_from_dom routine walks from the USE to the DEF block along via dominators. Along the way it marks blocks with outgoing edges to be visited from the top down. It currently looks for abnormal edges and inferred ranges in the first phase walk up the tree. This has some disadvantages in that it can be slow, and once an abnormal edge is noticed, no other inferred information is tracked. This patch leverages the cache's edge calculator which also handles inferred ranges. During the initial walk, all we need to do is mark any blocks which have inferred ranges as well. Then the walk back down will visit those blocks, and integrate any inferred ranges along with outgoing edge ranges. We were simply doing too much work previously. PR tree-optimization/127203 gcc/ * gimple-range-cache.cc (ranger_cache::range_from_dom): Mark both outgoing edges and inferred ranges as "to calculate".
