[llvm] [RISCV] Remove unused argument check (NFC) (PR #168313)
Garth Lei via llvm-commits
llvm-commits at lists.llvm.org
Sun Nov 16 19:40:01 PST 2025
https://github.com/garthlei created https://github.com/llvm/llvm-project/pull/168313
The index == 0 scenerio has already been handled by the early return, so only the upper half scenerio is relevant here.
>From 509abf08e7277d62cddf1f334707a34be94aa9db Mon Sep 17 00:00:00 2001
From: Bohan Lei <garthlei at linux.alibaba.com>
Date: Mon, 17 Nov 2025 11:33:16 +0800
Subject: [PATCH] [RISCV] Remove unused argument check (NFC)
The index == 0 scenerio has already been handled by the early return,
so only the upper half scenerio is relevant here.
---
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 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,
More information about the llvm-commits
mailing list