@@ -375,10 +375,10 @@ class PPCReduceCRLogicals : public MachineFunctionPass {
375
375
};
376
376
377
377
private:
378
- const PPCInstrInfo *TII;
379
- MachineFunction *MF;
380
- MachineRegisterInfo *MRI;
381
- const MachineBranchProbabilityInfo *MBPI;
378
+ const PPCInstrInfo *TII = nullptr ;
379
+ MachineFunction *MF = nullptr ;
380
+ MachineRegisterInfo *MRI = nullptr ;
381
+ const MachineBranchProbabilityInfo *MBPI = nullptr ;
382
382
383
383
// A vector to contain all the CR logical operations
384
384
SmallVector<CRLogicalOpInfo, 16 > AllCRLogicalOps;
@@ -470,21 +470,21 @@ PPCReduceCRLogicals::createCRLogicalOpInfo(MachineInstr &MIParam) {
470
470
} else {
471
471
MachineInstr *Def1 = lookThroughCRCopy (MIParam.getOperand (1 ).getReg (),
472
472
Ret.SubregDef1 , Ret.CopyDefs .first );
473
+ assert (Def1 && " Must be able to find a definition of operand 1." );
473
474
Ret.DefsSingleUse &=
474
475
MRI->hasOneNonDBGUse (Def1->getOperand (0 ).getReg ());
475
476
Ret.DefsSingleUse &=
476
477
MRI->hasOneNonDBGUse (Ret.CopyDefs .first ->getOperand (0 ).getReg ());
477
- assert (Def1 && " Must be able to find a definition of operand 1." );
478
478
if (isBinary (MIParam)) {
479
479
Ret.IsBinary = 1 ;
480
480
MachineInstr *Def2 = lookThroughCRCopy (MIParam.getOperand (2 ).getReg (),
481
481
Ret.SubregDef2 ,
482
482
Ret.CopyDefs .second );
483
+ assert (Def2 && " Must be able to find a definition of operand 2." );
483
484
Ret.DefsSingleUse &=
484
485
MRI->hasOneNonDBGUse (Def2->getOperand (0 ).getReg ());
485
486
Ret.DefsSingleUse &=
486
487
MRI->hasOneNonDBGUse (Ret.CopyDefs .second ->getOperand (0 ).getReg ());
487
- assert (Def2 && " Must be able to find a definition of operand 2." );
488
488
Ret.TrueDefs = std::make_pair (Def1, Def2);
489
489
} else {
490
490
Ret.TrueDefs = std::make_pair (Def1, nullptr );
0 commit comments