https://gcc.gnu.org/bugzilla/show_bug.cgi?id=111293
--- Comment #1 from Andrew Pinski <pinskia at gcc dot gnu.org> --- The difference is the trunk can figure out the range for j_8: PHI GROUP query for j_8 found : [irange] int [1, 1][8, 8] and adjusted original range from :[irange] int [1, 1][8, 8] to :[irange] int [1, 1][8, 8] Global Exported: j_8 = [irange] int [1, 1][8, 8] MASK 0x9 VALUE 0x8 But 13 can't: Global Exported: j_8 = [irange] int [-INF, +INF] NONZERO 0x9 I have not looked into how 13 can remove the call to foo though.