Skip to content

Commit 5901463

Browse files
authored
[SLP] NFC. BaseIndex is not used for getSameOpcode. (#110948)
1 parent d5f6e88 commit 5901463

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -831,8 +831,7 @@ static bool isValidForAlternation(unsigned Opcode) {
831831
}
832832

833833
static InstructionsState getSameOpcode(ArrayRef<Value *> VL,
834-
const TargetLibraryInfo &TLI,
835-
unsigned BaseIndex = 0);
834+
const TargetLibraryInfo &TLI);
836835

837836
/// Checks if the provided operands of 2 cmp instructions are compatible, i.e.
838837
/// compatible instructions or constants, or just some other regular values.
@@ -873,8 +872,8 @@ static bool isCmpSameOrSwapped(const CmpInst *BaseCI, const CmpInst *CI,
873872
/// InstructionsState, the Opcode that we suppose the whole list
874873
/// could be vectorized even if its structure is diverse.
875874
static InstructionsState getSameOpcode(ArrayRef<Value *> VL,
876-
const TargetLibraryInfo &TLI,
877-
unsigned BaseIndex) {
875+
const TargetLibraryInfo &TLI) {
876+
constexpr unsigned BaseIndex = 0;
878877
// Make sure these are all Instructions.
879878
if (llvm::any_of(VL, [](Value *V) { return !isa<Instruction>(V); }))
880879
return InstructionsState(VL[BaseIndex], nullptr, nullptr);

0 commit comments

Comments
 (0)