https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109233
--- Comment #10 from Aldy Hernandez <aldyh at gcc dot gnu.org> --- (In reply to Jakub Jelinek from comment #8) > And on the ranger side why we have determined the [0, 5] range rather than > [0, 4], whether it is related to inaccurate number of iterations estimation, > or ranger using it incorrectly, ... The [0, 5] is actually coming from SCEV, which ranger is using to refine the range. Presumably, ranger is doing worse than SCEV, because it doesn't improve it. $ grep 'Loops range fo' a.c.*evrp Loops range found for i_3: [irange] int [0, 5] NONZERO 0x7 and calculated range :[irange] int [-2147483647, +INF] Loops range found for i_3: [irange] int [0, 5] NONZERO 0x7 and calculated range :[irange] int [0, 6] NONZERO 0x7 Perhaps Andrew can pontificate on the recalculations / iterations / etc.