[llvm] 5901463 - [SLP] NFC. BaseIndex is not used for getSameOpcode. (#110948)
via llvm-commits
llvm-commits at lists.llvm.org
Thu Oct 3 04:58:47 PDT 2024
Author: Han-Kuan Chen
Date: 2024-10-03T19:58:44+08:00
New Revision: 5901463ada16fa54959a7c9c63ccf089dfc085c2
URL: https://github.com/llvm/llvm-project/commit/5901463ada16fa54959a7c9c63ccf089dfc085c2
DIFF: https://github.com/llvm/llvm-project/commit/5901463ada16fa54959a7c9c63ccf089dfc085c2.diff
LOG: [SLP] NFC. BaseIndex is not used for getSameOpcode. (#110948)
Added:
Modified:
llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp
Removed:
################################################################################
diff --git a/llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp b/llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp
index af9dfcbbf1170c..27e43df4949273 100644
--- a/llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp
+++ b/llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp
@@ -831,8 +831,7 @@ static bool isValidForAlternation(unsigned Opcode) {
}
static InstructionsState getSameOpcode(ArrayRef<Value *> VL,
- const TargetLibraryInfo &TLI,
- unsigned BaseIndex = 0);
+ const TargetLibraryInfo &TLI);
/// Checks if the provided operands of 2 cmp instructions are compatible, i.e.
/// compatible instructions or constants, or just some other regular values.
@@ -873,8 +872,8 @@ static bool isCmpSameOrSwapped(const CmpInst *BaseCI, const CmpInst *CI,
/// InstructionsState, the Opcode that we suppose the whole list
/// could be vectorized even if its structure is diverse.
static InstructionsState getSameOpcode(ArrayRef<Value *> VL,
- const TargetLibraryInfo &TLI,
- unsigned BaseIndex) {
+ const TargetLibraryInfo &TLI) {
+ constexpr unsigned BaseIndex = 0;
// Make sure these are all Instructions.
if (llvm::any_of(VL, [](Value *V) { return !isa<Instruction>(V); }))
return InstructionsState(VL[BaseIndex], nullptr, nullptr);
More information about the llvm-commits
mailing list