llvmbot wrote:
<!--LLVM PR SUMMARY COMMENT--> @llvm/pr-subscribers-backend-risc-v Author: Brandon Wu (4vtomat) <details> <summary>Changes</summary> This macro is used to check if compiler supports RVV intrinsics, so it should be defined no matter vector is enabled or not. Resolved https://github.com/riscv-non-isa/rvv-intrinsic-doc/issues/376 --- Full diff: https://github.com/llvm/llvm-project/pull/117356.diff 1 Files Affected: - (modified) clang/lib/Basic/Targets/RISCV.cpp (+4-4) ``````````diff 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) `````````` </details> https://github.com/llvm/llvm-project/pull/117356 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits