https://gcc.gnu.org/bugzilla/show_bug.cgi?id=110897
--- Comment #13 from JuzheZhong <juzhe.zhong at rivai dot ai> --- I just checked ARM SVE has the same behavior with RISC-V: https://godbolt.org/z/vY6ecY6Mx You can see this compiler explorer. ARM trunk GCC SVE failed to vectorize it too same as RISCV wheras ARM GCC 13.1 can vectorize it.