https://gcc.gnu.org/bugzilla/show_bug.cgi?id=31485
--- Comment #13 from Joel Yliluoma <bisqwit at iki dot fi> --- GCC 4.1.2 is indicated in the bug report headers. Luckily, Compiler Explorer has a copy of that exact version, and it indeed vectorizes the second function: https://godbolt.org/z/DC_SSb On my own system, the earliest I have is 4.6. The Compiler Explorer has 4.4, and it, or anything newer than that, no longer vectorizes either function.