1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-11-23 11:13:28 +01:00

[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 e3e2fa9c0a
commit bf4a2effd1

View File

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