[llvm-branch-commits] [clang] 726f698 - [Clang][RISCV] Bump rvv intrinsics version to v0.12
Tobias Hieta via llvm-branch-commits
llvm-branch-commits at lists.llvm.org
Fri Jul 28 00:11:45 PDT 2023
Author: eopXD
Date: 2023-07-28T09:08:15+02:00
New Revision: 726f698ac54bb2258a109bc8f24fc3d22e1043d5
URL: https://github.com/llvm/llvm-project/commit/726f698ac54bb2258a109bc8f24fc3d22e1043d5
DIFF: https://github.com/llvm/llvm-project/commit/726f698ac54bb2258a109bc8f24fc3d22e1043d5.diff
LOG: [Clang][RISCV] Bump rvv intrinsics version to v0.12
The LLVM now supports v0.12 of the RVV intrinsics. Users can use the macro
riscv_v_intrinsic to distinguish what kind of intrinsics is supported in
the compiler.
Please refer to tag descriptions under
https://github.com/riscv-non-isa/rvv-intrinsic-doc/tags
Reviewed By: kito-cheng
Differential Revision: https://reviews.llvm.org/D156394
(cherry picked from commit 20e87e2f794173deebd1cf8c86684452bb0c989b)
Added:
Modified:
clang/lib/Basic/Targets/RISCV.cpp
clang/test/Preprocessor/riscv-target-features.c
Removed:
################################################################################
diff --git a/clang/lib/Basic/Targets/RISCV.cpp b/clang/lib/Basic/Targets/RISCV.cpp
index 94c894dfec0b86..d55ab76395c827 100644
--- a/clang/lib/Basic/Targets/RISCV.cpp
+++ b/clang/lib/Basic/Targets/RISCV.cpp
@@ -196,8 +196,8 @@ void RISCVTargetInfo::getTargetDefines(const LangOptions &Opts,
if (ISAInfo->hasExtension("zve32x")) {
Builder.defineMacro("__riscv_vector");
- // Currently we support the v0.11 RISC-V V intrinsics.
- Builder.defineMacro("__riscv_v_intrinsic", Twine(getVersionValue(0, 11)));
+ // Currently we support the v0.12 RISC-V V intrinsics.
+ Builder.defineMacro("__riscv_v_intrinsic", Twine(getVersionValue(0, 12)));
}
auto VScale = getVScaleRange(Opts);
diff --git a/clang/test/Preprocessor/riscv-target-features.c b/clang/test/Preprocessor/riscv-target-features.c
index 27c089494de177..edfc26c9dfcf37 100644
--- a/clang/test/Preprocessor/riscv-target-features.c
+++ b/clang/test/Preprocessor/riscv-target-features.c
@@ -297,7 +297,7 @@
// RUN: | FileCheck --check-prefix=CHECK-ZVE64D-EXT %s
// CHECK-ZVE64D-EXT: __riscv_v_elen 64
// CHECK-ZVE64D-EXT: __riscv_v_elen_fp 64
-// CHECK-ZVE64D-EXT: __riscv_v_intrinsic 11000{{$}}
+// CHECK-ZVE64D-EXT: __riscv_v_intrinsic 12000{{$}}
// CHECK-ZVE64D-EXT: __riscv_v_min_vlen 64
// CHECK-ZVE64D-EXT: __riscv_vector 1
// CHECK-ZVE64D-EXT: __riscv_zve32f 1000000{{$}}
@@ -311,7 +311,7 @@
// RUN: | FileCheck --check-prefix=CHECK-ZVE64F-EXT %s
// CHECK-ZVE64F-EXT: __riscv_v_elen 64
// CHECK-ZVE64F-EXT: __riscv_v_elen_fp 32
-// CHECK-ZVE64F-EXT: __riscv_v_intrinsic 11000{{$}}
+// CHECK-ZVE64F-EXT: __riscv_v_intrinsic 12000{{$}}
// CHECK-ZVE64F-EXT: __riscv_v_min_vlen 64
// CHECK-ZVE64F-EXT: __riscv_vector 1
// CHECK-ZVE64F-EXT: __riscv_zve32f 1000000{{$}}
@@ -324,7 +324,7 @@
// RUN: | FileCheck --check-prefix=CHECK-ZVE64X-EXT %s
// CHECK-ZVE64X-EXT: __riscv_v_elen 64
// CHECK-ZVE64X-EXT: __riscv_v_elen_fp 0
-// CHECK-ZVE64X-EXT: __riscv_v_intrinsic 11000{{$}}
+// CHECK-ZVE64X-EXT: __riscv_v_intrinsic 12000{{$}}
// CHECK-ZVE64X-EXT: __riscv_v_min_vlen 64
// CHECK-ZVE64X-EXT: __riscv_vector 1
// CHECK-ZVE64X-EXT: __riscv_zve32x 1000000{{$}}
@@ -335,7 +335,7 @@
// RUN: | FileCheck --check-prefix=CHECK-ZVE32F-EXT %s
// CHECK-ZVE32F-EXT: __riscv_v_elen 32
// CHECK-ZVE32F-EXT: __riscv_v_elen_fp 32
-// CHECK-ZVE32F-EXT: __riscv_v_intrinsic 11000{{$}}
+// CHECK-ZVE32F-EXT: __riscv_v_intrinsic 12000{{$}}
// CHECK-ZVE32F-EXT: __riscv_v_min_vlen 32
// CHECK-ZVE32F-EXT: __riscv_vector 1
// CHECK-ZVE32F-EXT: __riscv_zve32f 1000000{{$}}
@@ -346,7 +346,7 @@
// RUN: | FileCheck --check-prefix=CHECK-ZVE32X-EXT %s
// CHECK-ZVE32X-EXT: __riscv_v_elen 32
// CHECK-ZVE32X-EXT: __riscv_v_elen_fp 0
-// CHECK-ZVE32X-EXT: __riscv_v_intrinsic 11000{{$}}
+// CHECK-ZVE32X-EXT: __riscv_v_intrinsic 12000{{$}}
// CHECK-ZVE32X-EXT: __riscv_v_min_vlen 32
// CHECK-ZVE32X-EXT: __riscv_vector 1
// CHECK-ZVE32X-EXT: __riscv_zve32x 1000000{{$}}
More information about the llvm-branch-commits
mailing list