[clang] 8e01042 - [RISCV] Add missing dependency check for Zvkb (#79467)
via cfe-commits
cfe-commits at lists.llvm.org
Thu Jan 25 19:14:48 PST 2024
Author: Brandon Wu
Date: 2024-01-26T11:14:43+08:00
New Revision: 8e01042da9d385d5ecd41e3ff3b60763995f253f
URL: https://github.com/llvm/llvm-project/commit/8e01042da9d385d5ecd41e3ff3b60763995f253f
DIFF: https://github.com/llvm/llvm-project/commit/8e01042da9d385d5ecd41e3ff3b60763995f253f.diff
LOG: [RISCV] Add missing dependency check for Zvkb (#79467)
Added:
Modified:
clang/test/Driver/riscv-toolchain-gcc-multilib-reuse.c
llvm/lib/Support/RISCVISAInfo.cpp
Removed:
################################################################################
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,
More information about the cfe-commits
mailing list