A15SDOptimizer::getPrefSPRLane - fix null dereference warning. NFCI

This commit is contained in:
Simon Pilgrim 2019-11-02 21:49:12 +00:00
parent 9a9c07d711
commit d397e29273
1 changed files with 1 additions and 2 deletions

View File

@ -157,9 +157,8 @@ unsigned A15SDOptimizer::getPrefSPRLane(unsigned SReg) {
MachineInstr *MI = MRI->getVRegDef(SReg);
if (!MI) return ARM::ssub_0;
MachineOperand *MO = MI->findRegisterDefOperand(SReg);
assert(MO->isReg() && "Non-register operand found!");
if (!MO) return ARM::ssub_0;
assert(MO->isReg() && "Non-register operand found!");
if (MI->isCopy() && usesRegClass(MI->getOperand(1),
&ARM::SPRRegClass)) {