unsigned Opcode = Res.Opcode;
if (!Res.HasAltOpcodes)
return InstructionsState(VL[0], Opcode, false);
- auto *OpInst = cast<Instruction>(VL[0]);
unsigned AltOpcode = getAltOpcode(Opcode);
// Examine each element in the list instructions VL to determine
// if some operations there could be considered as an alternative
auto *I = cast<Instruction>(VL[Cnt]);
unsigned InstOpcode = I->getOpcode();
if (InstOpcode != (isOdd(Cnt) ? AltOpcode : Opcode))
- return InstructionsState(OpInst, 0, false);
+ return InstructionsState(VL[0], 0, false);
}
- return InstructionsState(OpInst, Opcode, Res.HasAltOpcodes);
+ return InstructionsState(VL[0], Opcode, Res.HasAltOpcodes);
}
/// \returns true if all of the values in \p VL have the same type or false