forked from OSchip/llvm-project
A15SDOptimizer::getPrefSPRLane - fix null dereference warning. NFCI
This commit is contained in:
parent
9a9c07d711
commit
d397e29273
|
@ -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)) {
|
||||
|
|
Loading…
Reference in New Issue