@@ -4288,8 +4288,7 @@ enum srcStatus {
42884288 IS_LOWER_HALF,
42894289 IS_NEG,
42904290 IS_UPPER_HALF_NEG,
4291- IS_LOWER_HALF_NEG,
4292- INVALID
4291+ IS_LOWER_HALF_NEG
42934292};
42944293
42954294static bool isTruncHalf (const MachineInstr *MI,
@@ -4334,9 +4333,6 @@ static bool isShlHalf(const MachineInstr *MI, const MachineRegisterInfo &MRI) {
43344333
43354334static bool retOpStat (const MachineOperand *Op, srcStatus stat,
43364335 std::pair<const MachineOperand *, srcStatus> &curr) {
4337- if (stat == INVALID) {
4338- return false ;
4339- }
43404336 if ((Op->isReg () && !(Op->getReg ().isPhysical ())) || Op->isImm () ||
43414337 Op->isCImm () || Op->isFPImm ()) {
43424338 curr = {Op, stat};
@@ -4360,7 +4356,7 @@ srcStatus getNegStatus(srcStatus S) {
43604356 case IS_LOWER_HALF_NEG:
43614357 return IS_LOWER_HALF;
43624358 }
4363- return INVALID ;
4359+ llvm_unreachable ( " unexpected srcStatus " ) ;
43644360}
43654361
43664362static bool calcNextStatus (std::pair<const MachineOperand *, srcStatus> &curr,
@@ -4477,7 +4473,7 @@ static bool isSameOperand(const MachineOperand *Op1,
44774473 return Op1->isIdenticalTo (*Op2);
44784474}
44794475
4480- static bool validToPack (int HiStat, int LoStat, unsigned int &Mods,
4476+ static bool validToPack (srcStatus HiStat, srcStatus LoStat, unsigned int &Mods,
44814477 const MachineOperand *newOp,
44824478 const MachineOperand *RootOp, const SIInstrInfo &TII,
44834479 const MachineRegisterInfo &MRI) {
0 commit comments