https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107831
--- Comment #5 from Jeffrey A. Law <law at gcc dot gnu.org> --- Right. You also have to know the distance from the last probe (possibly an implicit one) to the start of the alloca space before you can contemplate eliding the probes in alloca space. There's a hook we can use, but it was more meant for AArch64 IIRC, but we might be able to use it for this purpose. You also have to worry about dynamic allocations in a loop. A single byte alloca could jump the stack if it's inside loop with a suitable number of iterations. In general, the model taken was to try and minimize explicit probes in the common case (ie, function entry) at the expense of taking additional probes in the uncommon case (dynamic allocations).