RISC-V: Upgrade RVV intrinsic version to 0.12
Upgrade the version of RVV intrinsic from 0.11 to 0.12. PR target/114017 gcc/ChangeLog: * config/riscv/riscv-c.cc (riscv_cpu_cpp_builtins): Upgrade the version to 0.12. gcc/testsuite/ChangeLog: * gcc.target/riscv/predef-__riscv_v_intrinsic.c: Update the version to 0.12. * gcc.target/riscv/rvv/base/pr114017-1.c: New test. Signed-off-by: Pan Li <pan2.li@intel.com>
This commit is contained in:
parent
9ca4c1bf08
commit
3688c2b1a6
3 changed files with 21 additions and 2 deletions
|
@ -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, 11));
|
||||
riscv_ext_version_value (0, 12));
|
||||
}
|
||||
|
||||
if (TARGET_XTHEADVECTOR)
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
|
||||
int main () {
|
||||
|
||||
#if __riscv_v_intrinsic != 11000
|
||||
#if __riscv_v_intrinsic != 12000
|
||||
#error "__riscv_v_intrinsic"
|
||||
#endif
|
||||
|
||||
|
|
19
gcc/testsuite/gcc.target/riscv/rvv/base/pr114017-1.c
Normal file
19
gcc/testsuite/gcc.target/riscv/rvv/base/pr114017-1.c
Normal file
|
@ -0,0 +1,19 @@
|
|||
/* { dg-do compile } */
|
||||
/* { dg-options "-march=rv64gcv -mabi=lp64d -O3" } */
|
||||
|
||||
#include "riscv_vector.h"
|
||||
|
||||
vuint8mf2_t
|
||||
test (vuint16m1_t val, size_t shift, size_t vl)
|
||||
{
|
||||
#if __riscv_v_intrinsic == 11000
|
||||
#warning "RVV Intrinsics v0.11"
|
||||
return __riscv_vnclipu (val, shift, vl);
|
||||
#endif
|
||||
|
||||
#if __riscv_v_intrinsic == 12000
|
||||
#warning "RVV Intrinsics v0.12" /* { dg-warning "RVV Intrinsics v0.12" } */
|
||||
return __riscv_vnclipu (val, shift, 0, vl);
|
||||
#endif
|
||||
}
|
||||
|
Loading…
Add table
Reference in a new issue