https://gcc.gnu.org/bugzilla/show_bug.cgi?id=101014
--- Comment #17 from Andrew Macleod <amacleod at redhat dot com> --- Created attachment 51050 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=51050&action=edit patch to fix the issue The gift that keeps on giving eh. OK, this should solve the infinite loop. Give it a try, I'm running it through testing now. When I introduced the sparse on-entry cache, it is limited to 15 unique ranges for any given ssa-name, then it reverts to varying for any additional values to be safe. The cache propagation engine works by combining incoming ranges and if that is different than that current on-entry range, stores that and proceeds to push this new value on outgoing edges. What was happening here is this new value that was calculated was beyond the 15 allowed. When it was stored, it was stored as VARYING. This block was in a cycle feeding back to itself, so when it calculated the on-enty value again and compared, it though it needed to update again. Which of course failed again... and the endless loop of trying to propagate was born. This patch checks that the value being stored to the cache is the same as the value when it is immediately reloaded. If that fails, we stop trying to propagate that value. Please check that it solves both this problam, and likely the 101148 problem