]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
RISC-V: Update RVV intrinsic version to ratified v1.0 master trunk
authorChristoph Müllner <christoph.muellner@vrull.eu>
Thu, 9 Apr 2026 16:22:50 +0000 (18:22 +0200)
committerChristoph Müllner <christoph.muellner@vrull.eu>
Fri, 10 Apr 2026 00:29:03 +0000 (02:29 +0200)
The RVV intrinsic implementation already matches the ratified v1.0
interface, but GCC still advertises __riscv_v_intrinsic as v0.12 and
the manual still points users at the stale v0.11.x documentation.

Update __riscv_v_intrinsic to v1.0, adjust the related tests, and
update the manual to say that GCC supports the ratified v1.0 RVV
intrinsic specification and point at the v1.0-ratified release.

gcc/ChangeLog:

* config/riscv/riscv-c.cc (riscv_cpu_cpp_builtins): Set
__riscv_v_intrinsic to v1.0.
* doc/extend.texi (RISC-V Vector Intrinsics): Document the
ratified v1.0 RVV intrinsic specification and update the link.

gcc/testsuite/ChangeLog:

* gcc.target/riscv/predef-__riscv_v_intrinsic.c: Update expected
__riscv_v_intrinsic value.
* gcc.target/riscv/rvv/base/pr114017-1.c: Update version check and
expected warning text to v1.0.

Signed-off-by: Christoph Müllner <christoph.muellner@vrull.eu>
gcc/config/riscv/riscv-c.cc
gcc/doc/extend.texi
gcc/testsuite/gcc.target/riscv/predef-__riscv_v_intrinsic.c
gcc/testsuite/gcc.target/riscv/rvv/base/pr114017-1.c

index 30125dbc3d68880e114f34d43f2f9f930552db38..369aac89c404d8d24262a3ffb8515fd3e2f30e9d 100644 (file)
@@ -139,7 +139,7 @@ riscv_cpu_cpp_builtins (cpp_reader *pfile)
     {
       builtin_define ("__riscv_vector");
       builtin_define_with_int_value ("__riscv_v_intrinsic",
-                                    riscv_ext_version_value (0, 12));
+                                    riscv_ext_version_value (1, 0));
 
       if (rvv_vector_bits == RVV_VECTOR_BITS_ZVL)
        builtin_define_with_int_value ("__riscv_v_fixed_vlen", TARGET_MIN_VLEN);
index d7956557353a211906b1bb213fa26b7b52bbf300..31d9edf1d7c141f5fe976782edeb6ce452cf787a 100644 (file)
@@ -27150,9 +27150,10 @@ temporarily paused or slowed down.
 @node RISC-V Vector Intrinsics
 @subsection RISC-V Vector Intrinsics
 
-GCC supports vector intrinsics as specified in version 0.11 of the RISC-V
-vector intrinsic specification, which is available at the following link:
-@uref{https://github.com/riscv-non-isa/rvv-intrinsic-doc/tree/v0.11.x}.
+GCC supports vector intrinsics as specified in the ratified version 1.0 of the
+RISC-V vector intrinsic specification, which is available from the repository's
+release page:
+@uref{https://github.com/riscv-non-isa/rvv-intrinsic-doc/releases/tag/v1.0-ratified}.
 All of these functions are declared in the include file @file{riscv_vector.h}.
 
 @node CORE-V Built-in Functions
index 07f1f159a8ff189f726a3a5cea10bb49180e78d3..8f5de66d232dd241caccfb8f20549b2ece727f4b 100644 (file)
@@ -3,7 +3,7 @@
 
 int main () {
 
-#if __riscv_v_intrinsic != 12000
+#if __riscv_v_intrinsic != 1000000
 #error "__riscv_v_intrinsic"
 #endif
 
index 8eee7c68f71c4edc8e1360df223c79eff9198fd5..b3337d8ce44e88dffda43bd2b76e979c219f7f75 100644 (file)
@@ -11,9 +11,8 @@ test (vuint16m1_t val, size_t shift, size_t vl)
   return __riscv_vnclipu (val, shift, vl);
 #endif
 
-#if __riscv_v_intrinsic == 12000
-  #warning "RVV Intrinsics v0.12" /* { dg-warning "RVV Intrinsics v0.12" } */
+#if __riscv_v_intrinsic == 1000000
+  #warning "RVV Intrinsics v1.0" /* { dg-warning "RVV Intrinsics v1.0" } */
   return __riscv_vnclipu (val, shift, 0, vl);
 #endif
 }
-