https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102681
--- Comment #15 from Andrew Pinski <pinskia at gcc dot gnu.org> --- So the major difference comes from mark_stack_region_used. We have a missing jump thread in ethread. Before the patch, ethread was able to jump thread all the way through: if (_13 != 0) goto <bb 3>; [5.50%] else goto <bb 4>; [94.50%] <bb 3> : # _22 = PHI <0(2)> goto <bb 7>; [INV] <bb 4> : # _18 = PHI <1(2)> _15 = upper_bound.coeffs[0]; goto <bb 6>; [100.00%] <bb 5> : But after we get: <bb 2> : _13 = upper_bound.coeffs[1]; if (_13 != 0) goto <bb 3>; [5.50%] else goto <bb 4>; [94.50%] <bb 3> : # _22 = PHI <0(2)> goto <bb 5>; [100.00%] <bb 4> : # _9 = PHI <1(2)> _15 = upper_bound.coeffs[0]; <bb 5> : # _16 = PHI <0(3), 1(4)> # const_upper_20 = PHI <const_upper_21(D)(3), _15(4)> if (_16 != 0) goto <bb 7>; [INV] else goto <bb 8>; [INV] We totally missed the jump threading of 3->5->7 path and the 4->5->8 path. Aldy, Can you look into why there is a missing jump threading there?