[clang] [llvm] [RISCV] Add missing dependency check for Zvkb (PR #79467)
via cfe-commits
cfe-commits at lists.llvm.org
Thu Jan 25 08:43:19 PST 2024
llvmbot wrote:
<!--LLVM PR SUMMARY COMMENT-->
@llvm/pr-subscribers-clang
@llvm/pr-subscribers-llvm-support
Author: Brandon Wu (4vtomat)
<details>
<summary>Changes</summary>
---
Full diff: https://github.com/llvm/llvm-project/pull/79467.diff
2 Files Affected:
- (modified) clang/test/Driver/riscv-toolchain-gcc-multilib-reuse.c (+1-1)
- (modified) llvm/lib/Support/RISCVISAInfo.cpp (+2-2)
``````````diff
diff --git a/clang/test/Driver/riscv-toolchain-gcc-multilib-reuse.c b/clang/test/Driver/riscv-toolchain-gcc-multilib-reuse.c
index 1f8a5a8821edfa..ac70fb2631a590 100644
--- a/clang/test/Driver/riscv-toolchain-gcc-multilib-reuse.c
+++ b/clang/test/Driver/riscv-toolchain-gcc-multilib-reuse.c
@@ -66,7 +66,7 @@
// RUN: -target riscv64-unknown-elf \
// RUN: --gcc-toolchain=%S/Inputs/multilib_riscv_elf_sdk \
// RUN: --print-multi-directory \
-// RUN: -march=rv32i_zvkb -mabi=ilp32 \
+// RUN: -march=rv32iv_zvkb -mabi=ilp32 \
// RUN: | FileCheck -check-prefix=GCC-MULTI-LIB-REUSE-RV32I_ZVKB-ILP32 %s
// GCC-MULTI-LIB-REUSE-RV32I_ZVKB-ILP32: rv32i/ilp32
// GCC-MULTI-LIB-REUSE-RV32I_ZVKB-ILP32-NOT: {{^.+$}}
diff --git a/llvm/lib/Support/RISCVISAInfo.cpp b/llvm/lib/Support/RISCVISAInfo.cpp
index 32b4ff5de86f1e..a359e6eefa8f1d 100644
--- a/llvm/lib/Support/RISCVISAInfo.cpp
+++ b/llvm/lib/Support/RISCVISAInfo.cpp
@@ -976,8 +976,8 @@ Error RISCVISAInfo::checkDependency() {
errc::invalid_argument,
"'zvbc' requires 'v' or 'zve64*' extension to also be specified");
- if ((Exts.count("zvkg") || Exts.count("zvkned") || Exts.count("zvknha") ||
- Exts.count("zvksed") || Exts.count("zvksh")) &&
+ if ((Exts.count("zvkb") || Exts.count("zvkg") || Exts.count("zvkned") ||
+ Exts.count("zvknha") || Exts.count("zvksed") || Exts.count("zvksh")) &&
!HasVector)
return createStringError(
errc::invalid_argument,
``````````
</details>
https://github.com/llvm/llvm-project/pull/79467
More information about the cfe-commits
mailing list