https://gcc.gnu.org/g:b753ec3d7457189728dcaecd37e73c46226c05fe

commit r16-8554-gb753ec3d7457189728dcaecd37e73c46226c05fe
Author: Christoph Müllner <[email protected]>
Date:   Thu Apr 9 18:22:50 2026 +0200

    RISC-V: Update RVV intrinsic version to ratified v1.0
    
    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 <[email protected]>

Diff:
---
 gcc/config/riscv/riscv-c.cc                                 | 2 +-
 gcc/doc/extend.texi                                         | 7 ++++---
 gcc/testsuite/gcc.target/riscv/predef-__riscv_v_intrinsic.c | 2 +-
 gcc/testsuite/gcc.target/riscv/rvv/base/pr114017-1.c        | 5 ++---
 4 files changed, 8 insertions(+), 8 deletions(-)

diff --git a/gcc/config/riscv/riscv-c.cc b/gcc/config/riscv/riscv-c.cc
index 30125dbc3d68..369aac89c404 100644
--- a/gcc/config/riscv/riscv-c.cc
+++ b/gcc/config/riscv/riscv-c.cc
@@ -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);
diff --git a/gcc/doc/extend.texi b/gcc/doc/extend.texi
index d7956557353a..31d9edf1d7c1 100644
--- a/gcc/doc/extend.texi
+++ b/gcc/doc/extend.texi
@@ -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
diff --git a/gcc/testsuite/gcc.target/riscv/predef-__riscv_v_intrinsic.c 
b/gcc/testsuite/gcc.target/riscv/predef-__riscv_v_intrinsic.c
index 07f1f159a8ff..8f5de66d232d 100644
--- a/gcc/testsuite/gcc.target/riscv/predef-__riscv_v_intrinsic.c
+++ b/gcc/testsuite/gcc.target/riscv/predef-__riscv_v_intrinsic.c
@@ -3,7 +3,7 @@
 
 int main () {
 
-#if __riscv_v_intrinsic != 12000
+#if __riscv_v_intrinsic != 1000000
 #error "__riscv_v_intrinsic"
 #endif
 
diff --git a/gcc/testsuite/gcc.target/riscv/rvv/base/pr114017-1.c 
b/gcc/testsuite/gcc.target/riscv/rvv/base/pr114017-1.c
index 8eee7c68f71c..b3337d8ce44e 100644
--- a/gcc/testsuite/gcc.target/riscv/rvv/base/pr114017-1.c
+++ b/gcc/testsuite/gcc.target/riscv/rvv/base/pr114017-1.c
@@ -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
 }
-

Reply via email to