forked from OSchip/llvm-project
[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:
parent
5eeed77f87
commit
1224260f83
|
@ -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);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue