GCC Newspaper
OCTOBER 6, 2026
Date
/
Architectures
Components
Topics
News & Policy
Other
risc-v

RISC-V: Fix single-step expansion.

Corrects RISC-V single-step instruction expansion by using the correct pattern count.

This change fixes an issue in the RISC-V vector constant synthesis where an incorrect number of patterns was used for creating intermediate operations. The fix ensures that the ‘npatterns’ from the original vector builder are used, aligning the expansion logic with the intended behavior and resolving a problem reported in PR126550.

In Details

In RISC-V vector extension support, expand_const_vector_single_step_npatterns in riscv-v.cc builds an intermediate vector using a secondary builder. This patch corrects the use of npatterns from this secondary builder, which could differ from the primary one, potentially leading to incorrect intermediate operations. It now correctly uses the npatterns from the primary builder.

Filed Under: risc-vvectorization