Skip to content

Commit

Permalink
Fix RVV intrinsic version detection.
Browse files Browse the repository at this point in the history
__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.
  • Loading branch information
Simon Hosie committed Mar 12, 2024
1 parent ad9a439 commit 82dc7a2
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/arch/helperrvv.h
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,8 @@
#endif
#endif

#if __riscv_v_intrinsic <= 12000
#if __riscv_v_intrinsic < 1000000 && !(defined(__clang_major__) && __clang_major__ >= 18)
#warning "Using fallback implementations for vcreate"
// __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
Expand Down

0 comments on commit 82dc7a2

Please sign in to comment.