1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-11-22 18:54:02 +01:00

A15SDOptimizer::getPrefSPRLane - fix null dereference warning. NFCI

This commit is contained in:
Simon Pilgrim 2019-11-02 21:49:12 +00:00
parent 6daaf620de
commit 50ba5815e2

View File

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