https://gcc.gnu.org/bugzilla/show_bug.cgi?id=125994
--- Comment #1 from GCC Commits <cvs-commit at gcc dot gnu.org> --- The master branch has been updated by Jeff Law <[email protected]>: https://gcc.gnu.org/g:b3212445035f2ce61bb1e1f296dafd2ea238a12b commit r17-1986-gb3212445035f2ce61bb1e1f296dafd2ea238a12b Author: Robin Dapp <[email protected]> Date: Mon Jun 29 18:46:01 2026 -0600 RISC-V: Add scalar-mode handling to vector misalignment hook [PR125994]. Hi, Julien reported that we don't peel for alignment anymore after my vector-misalignment changes last year. Indeed, I didn't consider the "scalar vectorization" case for slow-misaligned targets. We fail to perform peeling for alignment and instead emit byte accesses. This patch now only returns true (=misalignment supported) if misaligned scalar accesses are not slow. Regtested on rv64gcv_zvl512b. Going to wait for the CI before moving forward. Reported-by: Julien Thillard <[email protected]> Regards Robin PR target/125994 gcc/ChangeLog: * config/riscv/riscv.cc (riscv_support_vector_misalignment): Handle scalar modes. gcc/testsuite/ChangeLog: * gcc.target/riscv/rvv/autovec/pr125994.c: New test.
