[llvm] [RISCV] Remove redundant check for Subtarget.hasStdExtZbc(). NFC (PR #225152)
Craig Topper via llvm-commits
llvm-commits at lists.llvm.org
Mon Sep 21 10:54:40 PDT 2026
https://github.com/topperc created https://github.com/llvm/llvm-project/pull/225152
Zbc implies Zbkc so we only need to check Zbkc.
>From 5b30a4d889b898cbc0175d26ef1a2f664752050a Mon Sep 17 00:00:00 2001
From: Craig Topper <craig.topper at sifive.com>
Date: Mon, 21 Sep 2026 10:53:50 -0700
Subject: [PATCH] [RISCV] Remove redundant check for Subtarget.hasStdExtZbc().
NFC
Zbc implies Zbkc so we only need to check Zbkc.
---
llvm/lib/Target/RISCV/RISCVISelLowering.cpp | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/llvm/lib/Target/RISCV/RISCVISelLowering.cpp b/llvm/lib/Target/RISCV/RISCVISelLowering.cpp
index f17d9e90bfb73..f1d3ed6a863a4 100644
--- a/llvm/lib/Target/RISCV/RISCVISelLowering.cpp
+++ b/llvm/lib/Target/RISCV/RISCVISelLowering.cpp
@@ -530,7 +530,7 @@ RISCVTargetLowering::RISCVTargetLowering(const TargetMachine &TM,
setOperationAction({ISD::AVGFLOORS, ISD::AVGFLOORU}, MVT::i32, Legal);
}
- if (Subtarget.hasStdExtZbc() || Subtarget.hasStdExtZbkc()) {
+ if (Subtarget.hasStdExtZbkc()) {
setOperationAction({ISD::CLMUL, ISD::CLMULH}, XLenVT, Legal);
if (Subtarget.hasStdExtZbc())
setOperationAction(ISD::CLMULR, XLenVT, Legal);
More information about the llvm-commits
mailing list