https://gcc.gnu.org/bugzilla/show_bug.cgi?id=67288
--- Comment #13 from Segher Boessenkool <segher at gcc dot gnu.org> --- This setup code is created *by* the RTL loop optimisers, via iv_number_of_iterations IIRC. Combine cannot get rid of it because it does not know the count cannot be 0 (that is info from a different bb). Yes I think we want some extra hooks so the target can tune how expensive loops are, based on exit condition, if it is the inner loop, etc.