Skip to content

Commit 90a776f

Browse files
authored
[clang][RISCV] __riscv_v_intrinsic macro doesn't need zve32x (#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 riscv-non-isa/rvv-intrinsic-doc#376
1 parent 38a3cce commit 90a776f

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

clang/lib/Basic/Targets/RISCV.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -216,11 +216,11 @@ void RISCVTargetInfo::getTargetDefines(const LangOptions &Opts,
216216
if (ISAInfo->hasExtension("c"))
217217
Builder.defineMacro("__riscv_compressed");
218218

219-
if (ISAInfo->hasExtension("zve32x")) {
219+
if (ISAInfo->hasExtension("zve32x"))
220220
Builder.defineMacro("__riscv_vector");
221-
// Currently we support the v1.0 RISC-V V intrinsics.
222-
Builder.defineMacro("__riscv_v_intrinsic", Twine(getVersionValue(1, 0)));
223-
}
221+
222+
// Currently we support the v1.0 RISC-V V intrinsics.
223+
Builder.defineMacro("__riscv_v_intrinsic", Twine(getVersionValue(1, 0)));
224224

225225
auto VScale = getVScaleRange(Opts);
226226
if (VScale && VScale->first && VScale->first == VScale->second)

0 commit comments

Comments
 (0)