Skip to content

Commit

Permalink
[SLP][NFC]Improved isAltShuffle by comparing instructions instead of
Browse files Browse the repository at this point in the history
opcodes, NFC.

NFC part of D115955.
  • Loading branch information
alexey-bataev committed Jan 5, 2022
1 parent a881215 commit dd83bef
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp
Expand Up @@ -435,7 +435,7 @@ struct InstructionsState {
}

/// Some of the instructions in the list have alternate opcodes.
bool isAltShuffle() const { return getOpcode() != getAltOpcode(); }
bool isAltShuffle() const { return AltOp != MainOp; }

bool isOpcodeOrAlt(Instruction *I) const {
unsigned CheckedOpcode = I->getOpcode();
Expand Down Expand Up @@ -2019,9 +2019,7 @@ class BoUpSLP {
}

/// Some of the instructions in the list have alternate opcodes.
bool isAltShuffle() const {
return getOpcode() != getAltOpcode();
}
bool isAltShuffle() const { return MainOp != AltOp; }

bool isOpcodeOrAlt(Instruction *I) const {
unsigned CheckedOpcode = I->getOpcode();
Expand Down

0 comments on commit dd83bef

Please sign in to comment.