Skip to content

[RISCV] Add missing dependency check for Zvkb #79467

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jan 26, 2024

Conversation

4vtomat
Copy link
Member

@4vtomat 4vtomat commented Jan 25, 2024

No description provided.

@llvmbot llvmbot added clang Clang issues not falling into any other category backend:RISC-V clang:driver 'clang' and 'clang++' user-facing binaries. Not 'clang-cl' llvm:support labels Jan 25, 2024
@4vtomat 4vtomat requested review from topperc and kito-cheng January 25, 2024 16:42
@llvmbot
Copy link
Member

llvmbot commented Jan 25, 2024

@llvm/pr-subscribers-clang-driver
@llvm/pr-subscribers-backend-risc-v
@llvm/pr-subscribers-clang

@llvm/pr-subscribers-llvm-support

Author: Brandon Wu (4vtomat)

Changes

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 --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,

Copy link
Collaborator

@topperc topperc left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@4vtomat 4vtomat force-pushed the missing_dependency_check_for_zvkb branch from 61dd60b to d451e89 Compare January 26, 2024 02:25
@4vtomat 4vtomat force-pushed the missing_dependency_check_for_zvkb branch from d451e89 to 6f16a5b Compare January 26, 2024 03:13
@4vtomat 4vtomat merged commit 8e01042 into llvm:main Jan 26, 2024
@4vtomat 4vtomat deleted the missing_dependency_check_for_zvkb branch January 26, 2024 03:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backend:RISC-V clang:driver 'clang' and 'clang++' user-facing binaries. Not 'clang-cl' clang Clang issues not falling into any other category llvm:support
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants