[llvm] [RISCV] Remove unused argument check (NFC) (PR #168313)
via llvm-commits
llvm-commits at lists.llvm.org
Sun Nov 16 19:40:33 PST 2025
llvmbot wrote:
<!--LLVM PR SUMMARY COMMENT-->
@llvm/pr-subscribers-backend-risc-v
Author: Garth Lei (garthlei)
<details>
<summary>Changes</summary>
The index == 0 scenerio has already been handled by the early return, so only the upper half scenerio is relevant here.
---
Full diff: https://github.com/llvm/llvm-project/pull/168313.diff
1 Files Affected:
- (modified) llvm/lib/Target/RISCV/RISCVISelLowering.cpp (+1-1)
``````````diff
diff --git a/llvm/lib/Target/RISCV/RISCVISelLowering.cpp b/llvm/lib/Target/RISCV/RISCVISelLowering.cpp
index 38cce26e44af4..c6eb0e929f93d 100644
--- a/llvm/lib/Target/RISCV/RISCVISelLowering.cpp
+++ b/llvm/lib/Target/RISCV/RISCVISelLowering.cpp
@@ -2539,7 +2539,7 @@ bool RISCVTargetLowering::isExtractSubvectorCheap(EVT ResVT, EVT SrcVT,
// TODO: For sizes which aren't multiples of VLEN sizes, this may not be
// a cheap extract. However, this case is important in practice for
// shuffled extracts of longer vectors. How resolve?
- return (ResElts * 2) == SrcElts && (Index == 0 || Index == ResElts);
+ return (ResElts * 2) == SrcElts && Index == ResElts;
}
MVT RISCVTargetLowering::getRegisterTypeForCallingConv(LLVMContext &Context,
``````````
</details>
https://github.com/llvm/llvm-project/pull/168313
More information about the llvm-commits
mailing list