-
Notifications
You must be signed in to change notification settings - Fork 14.3k
[clang][RISCV] __riscv_v_intrinsic macro doesn't need zve32x #117356
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
This macro is used to check if compiler supports RVV intrinsics, so it should be defined no matter vector is enabled or not. Resolved riscv-non-isa/rvv-intrinsic-doc#376
@llvm/pr-subscribers-clang @llvm/pr-subscribers-backend-risc-v Author: Brandon Wu (4vtomat) ChangesThis macro is used to check if compiler supports RVV intrinsics, so it Full diff: https://github.com/llvm/llvm-project/pull/117356.diff 1 Files Affected:
diff --git a/clang/lib/Basic/Targets/RISCV.cpp b/clang/lib/Basic/Targets/RISCV.cpp
index f0623070319e1f..0f8607c22d4473 100644
--- a/clang/lib/Basic/Targets/RISCV.cpp
+++ b/clang/lib/Basic/Targets/RISCV.cpp
@@ -216,11 +216,11 @@ void RISCVTargetInfo::getTargetDefines(const LangOptions &Opts,
if (ISAInfo->hasExtension("c"))
Builder.defineMacro("__riscv_compressed");
- if (ISAInfo->hasExtension("zve32x")) {
+ if (ISAInfo->hasExtension("zve32x"))
Builder.defineMacro("__riscv_vector");
- // Currently we support the v1.0 RISC-V V intrinsics.
- Builder.defineMacro("__riscv_v_intrinsic", Twine(getVersionValue(1, 0)));
- }
+
+ // Currently we support the v1.0 RISC-V V intrinsics.
+ Builder.defineMacro("__riscv_v_intrinsic", Twine(getVersionValue(1, 0)));
auto VScale = getVScaleRange(Opts);
if (VScale && VScale->first && VScale->first == VScale->second)
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM.
LLVM Buildbot has detected a new failure on builder Full details are available at: https://lab.llvm.org/buildbot/#/builders/65/builds/8430 Here is the relevant piece of the build log for the reference
|
LLVM Buildbot has detected a new failure on builder Full details are available at: https://lab.llvm.org/buildbot/#/builders/18/builds/7622 Here is the relevant piece of the build log for the reference
|
This macro is used to check if compiler supports RVV intrinsics, so it
should be defined no matter vector is enabled or not.
Resolved riscv-non-isa/rvv-intrinsic-doc#376