mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-04-11 00:39:36 +00:00
Add a missing check to avoid dereference null. No sensible test case possible. Sorry. rdar://11745134
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@159236 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
bbbe413846
commit
d096479f31
@ -1802,6 +1802,8 @@ static bool isSuitableForMask(MachineInstr *&MI, unsigned SrcReg,
|
||||
bool ARMBaseInstrInfo::
|
||||
OptimizeCompareInstr(MachineInstr *CmpInstr, unsigned SrcReg, int CmpMask,
|
||||
int CmpValue, const MachineRegisterInfo *MRI) const {
|
||||
if (MRI->def_empty(SrcReg))
|
||||
return false;
|
||||
|
||||
MachineRegisterInfo::def_iterator DI = MRI->def_begin(SrcReg);
|
||||
if (llvm::next(DI) != MRI->def_end())
|
||||
|
Loading…
x
Reference in New Issue
Block a user