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

RISC-V: Fix zvfh iterators.

RISC-V vector iterators for Zvfh modes are corrected to include the TARGET_ZVFH flag.

This commit corrects an issue with RISC-V vector iterators related to Zvfh modes. Specifically, the VWEXTF and VLS SF modes were incorrectly missing the TARGET_ZVFH flag. This oversight meant these modes were not properly recognized when Zvfh was enabled. The fix involves adding the TARGET_ZVFH flag to the affected iterator definitions, ensuring correct compilation for programs utilizing these vector operations.

In Details

RISC-V vector iterator definitions (vector-iterators.md) are updated. The VWEXTF and VLS SF modes previously failed to check TARGET_ZVFH, leading to incorrect selection when Zvfh is enabled. This is attributed to a copy-paste error. The fix adds the TARGET_ZVFH flag to the relevant iterator configurations.

For Context
RISC-V
A modular and extensible open-standard Instruction Set Architecture (ISA) based on Reduced Instruction Set Computing principles.
Zvfh
A RISC-V vector extension that adds support for 16-bit floating-point (half-precision) vector operations.
vector iterators
A mechanism within GCC's target description files used to define and manage different configurations and modes for vector operations, allowing the compiler to generate code for various vector lengths and data types.
VWEXTF
A RISC-V vector instruction for performing a vector extract with floating-point elements, often involving widening.
VLS
A RISC-V vector instruction related to load operations, likely involving strides or specific memory access patterns.
SF modes
In the context of RISC-V vector operations, SF likely refers to 'single-precision floating-point' mode, though in this specific commit, it might be a qualifier for the iterator definition itself.
TARGET_ZVFH
A GCC target flag that indicates support for the RISC-V Zvfh vector extension.
Filed Under: risc-vvectorcompiler