https://github.com/4vtomat created https://github.com/llvm/llvm-project/pull/117356
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 >From a29150c588d7894dd21f72833a43e1398b406bed Mon Sep 17 00:00:00 2001 From: Brandon Wu <brandon...@sifive.com> Date: Fri, 22 Nov 2024 10:08:09 -0800 Subject: [PATCH] [clang][RISCV] __riscv_v_intrinsic macro doesn't need zve32x 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 --- clang/lib/Basic/Targets/RISCV.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) 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) _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits