https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114151
--- Comment #9 from Andrew Macleod <amacleod at redhat dot com> --- Created attachment 57620 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=57620&action=edit proposed patch Does this solve your problem if there is an active ranger? it bootstraps with no regressions ITs pretty minimal, and basically we invokes the cache's version of range_of_expr if there is no context. I tweaked it such that if there is no context, and the def has not been calculated yet, it calls range_of_def, and combines it with any SSA_NAME_RANGE_INFO that may have pre-existed. All without invoking any new lookups. This seems relatively harmless and does not spawn new dynamic lookups. As long as it resolves your issue... If it still does not work, and we require the def to actually be evaluated, I will look into that. we prpbably should do that anyway. There appears to be a cycle when this is invoked from the loop analysis, probably because folding of PHIs uses loop info... and back and forth we go. I'd probably need to add a flag to the ranger instantiation to tell it to avoid using loop info. Are we looking to fix this in this release?