From 04ad3259d7612d9c5890c3966725cd0c063b87e2 Mon Sep 17 00:00:00 2001 From: Simon Hosie Date: Fri, 15 Mar 2024 00:58:10 -0700 Subject: [PATCH] Fix RVV intrinsic version detection. (#530) __riscv_vcreate* appear after RVV intrinsics v0.12, and the next version after that is v1.0 which is not yet ratified. Nevertheless, clang-18 and up already have the support we need. --- src/arch/helperrvv.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/arch/helperrvv.h b/src/arch/helperrvv.h index f13f0577..f304434a 100644 --- a/src/arch/helperrvv.h +++ b/src/arch/helperrvv.h @@ -70,7 +70,7 @@ #endif #endif -#if __riscv_v_intrinsic <= 12000 +#if __riscv_v_intrinsic < 1000000 && !(defined(__clang_major__) && __clang_major__ >= 18) // __riscv_vcreate* intrinsics only showed up in v1.0-rc0 of the RVV intrinsics // spec and have already been implemented in clang-18, but are useful for // eliminating issues with uninitialised data because they are explicit that