[llvm] [SLP] NFC. BaseIndex is not used for getSameOpcode. (PR #110948)
Han-Kuan Chen via llvm-commits
llvm-commits at lists.llvm.org
Wed Oct 2 20:12:06 PDT 2024
https://github.com/HanKuanChen created https://github.com/llvm/llvm-project/pull/110948
None
>From 0b0e73b6bc1c2da00e99fc8ed7d89de348cf0556 Mon Sep 17 00:00:00 2001
From: Han-Kuan Chen <hankuan.chen at sifive.com>
Date: Wed, 2 Oct 2024 02:34:06 -0700
Subject: [PATCH] [SLP] NFC. BaseIndex is not used for getSameOpcode.
---
llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp | 7 +++----
1 file changed, 3 insertions(+), 4 deletions(-)
diff --git a/llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp b/llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp
index 6b8ec55b30426c..75d8f054bf1ad1 100644
--- a/llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp
+++ b/llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp
@@ -827,8 +827,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.
@@ -869,8 +868,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