[SLPVectorizer] getSameOpcode - remove unusued alternate code [NFC]

We early-out for the case where we don't use alternate opcodes, so no need to check for it later.

llvm-svn: 334587
This commit is contained in:
Simon Pilgrim 2018-06-13 10:14:27 +00:00
parent 5eeed77f87
commit 1224260f83
1 changed files with 1 additions and 4 deletions

View File

@ -431,11 +431,8 @@ static InstructionsState getSameOpcode(ArrayRef<Value *> VL) {
for (int Cnt = 0, E = VL.size(); Cnt < E; Cnt++) { for (int Cnt = 0, E = VL.size(); Cnt < E; Cnt++) {
auto *I = cast<Instruction>(VL[Cnt]); auto *I = cast<Instruction>(VL[Cnt]);
unsigned InstOpcode = I->getOpcode(); unsigned InstOpcode = I->getOpcode();
if ((Res.HasAltOpcodes && if (InstOpcode != (isOdd(Cnt) ? AltOpcode : Opcode))
InstOpcode != (isOdd(Cnt) ? AltOpcode : Opcode)) ||
(!Res.HasAltOpcodes && InstOpcode != Opcode)) {
return InstructionsState(OpInst, 0, false); return InstructionsState(OpInst, 0, false);
}
} }
return InstructionsState(OpInst, Opcode, Res.HasAltOpcodes); return InstructionsState(OpInst, Opcode, Res.HasAltOpcodes);
} }