https://gcc.gnu.org/bugzilla/show_bug.cgi?id=106234
--- Comment #2 from Andrew Macleod <amacleod at redhat dot com> --- Created attachment 53281 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=53281&action=edit proposed patch we're having some connection issues, but I am in the process of trying to test the attached patch. basically, when we were ensuring the range was set in the immediate dominator, I was *suppose* to first check to see if it was already set and not make the call... like the other call sites... Doh! Without that, it was possible for this to be quadratic when the correct circumstances were presented.. as in this case. It walks the dominator chain all the way to the top, not utilizing the cache. this should make it linear again. speedup in your testcase for VRP was noticable. Let me know if it resolves your problem.. and I wil continue the test cycle