https://github.com/4vtomat updated 
https://github.com/llvm/llvm-project/pull/79467

>From d451e89a2bf650d3af638a2d22582135ad53cc27 Mon Sep 17 00:00:00 2001
From: Brandon Wu <brandon...@sifive.com>
Date: Thu, 25 Jan 2024 08:13:31 -0800
Subject: [PATCH] [RISCV] Add missing dependency check for Zvkb

---
 clang/test/Driver/riscv-toolchain-gcc-multilib-reuse.c | 2 +-
 llvm/lib/Support/RISCVISAInfo.cpp                      | 4 ++--
 2 files changed, 3 insertions(+), 3 deletions(-)

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,

_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to