[Bug target/125215] RISC-V: Wrong code in RISC-V SLP vectorization
cvs-commit at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Sun May 31 15:36:05 GMT 2026
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=125215
--- Comment #11 from GCC Commits <cvs-commit at gcc dot gnu.org> ---
The releases/gcc-16 branch has been updated by Jeff Law <law@gcc.gnu.org>:
https://gcc.gnu.org/g:a1e8830c67aa30ce986af09aea7439077d2a2520
commit r16-9025-ga1e8830c67aa30ce986af09aea7439077d2a2520
Author: Zhongyao Chen <chen.zhongyao@zte.com.cn>
Date: Fri May 8 19:02:06 2026 +0800
RISC-V: Remove interleaved vector synthesis optimization [PR125215]
This patch removes the "hi/lo" optimization path in interleaved
stepped constant vector synthesis. This optimization was found
to be not really better than the fallback merge version. Once the
overflow issue is fixed, the extra masking makes the code generation
"even worse". So remove it instead of fixing.
Obsolete tests slp-interleave-[1-5].c are also removed as they were
specifically designed to verify this now-removed path.
My local test shows no regression.
PR target/125215
gcc/ChangeLog:
* config/riscv/riscv-v.cc
(expand_const_vector_interleaved_stepped_npatterns):
Remove hi/lo optimization and always use the merge fallback.
gcc/testsuite/ChangeLog:
* gcc.target/riscv/rvv/autovec/pr125215.c: New test.
* gcc.target/riscv/rvv/autovec/slp-interleave-1.c: Remove.
* gcc.target/riscv/rvv/autovec/slp-interleave-2.c: Remove.
* gcc.target/riscv/rvv/autovec/slp-interleave-3.c: Remove.
* gcc.target/riscv/rvv/autovec/slp-interleave-4.c: Remove.
* gcc.target/riscv/rvv/autovec/slp-interleave-5.c: Remove.
Signed-off-by: Zhongyao Chen <chen.zhongyao@zte.com.cn>
(cherry picked from commit ecfbd7d1b92886024ac6e94000425b3cd0bd0194)
More information about the Gcc-bugs
mailing list