https://gcc.gnu.org/bugzilla/show_bug.cgi?id=77902
--- Comment #1 from Allan Jensen <linux at carewolf dot com> --- Further experimentation shows that GCC can sometimes reason about the remaining range but does so inconsistenly. For instance this examplse also fails: int result = 0; for (; count >= 4; count -= 4) { // Manually vectorized or batched code foobar_4x(result, vector); vector += 4; } for (; count >= 0; --count) { // Still autovectorized result += *vector++; } But replacing the epilogue with a loop that counts up, and GCC appears to figure out it is pointless to vectorize: for (int i = 0; i < count; ++count) { // correctly not vectorized