diff options
| author | Jakob Stoklund Olesen <stoklund@2pi.dk> | 2012-09-27 16:34:19 +0000 |
|---|---|---|
| committer | Jakob Stoklund Olesen <stoklund@2pi.dk> | 2012-09-27 16:34:19 +0000 |
| commit | 1d19582a8f0241c7128d9505d5c49f72b37e6930 (patch) | |
| tree | 8ecfeef556d0c96a573b8add355313d7339e740b /llvm/lib/CodeGen/LiveRangeEdit.cpp | |
| parent | ebca38a4c5f279caf6b3aa38adea5c2f005fc9cd (diff) | |
| download | bcm5719-llvm-1d19582a8f0241c7128d9505d5c49f72b37e6930.tar.gz bcm5719-llvm-1d19582a8f0241c7128d9505d5c49f72b37e6930.zip | |
Avoid dereferencing a NULL pointer.
Fixes PR13943.
llvm-svn: 164778
Diffstat (limited to 'llvm/lib/CodeGen/LiveRangeEdit.cpp')
| -rw-r--r-- | llvm/lib/CodeGen/LiveRangeEdit.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/llvm/lib/CodeGen/LiveRangeEdit.cpp b/llvm/lib/CodeGen/LiveRangeEdit.cpp index b4ce9aa8c12..82710414b30 100644 --- a/llvm/lib/CodeGen/LiveRangeEdit.cpp +++ b/llvm/lib/CodeGen/LiveRangeEdit.cpp @@ -87,7 +87,7 @@ bool LiveRangeEdit::allUsesAvailableAt(const MachineInstr *OrigMI, // We can't remat physreg uses, unless it is a constant. if (TargetRegisterInfo::isPhysicalRegister(MO.getReg())) { - if (MRI.isConstantPhysReg(MO.getReg(), VRM->getMachineFunction())) + if (MRI.isConstantPhysReg(MO.getReg(), *OrigMI->getParent()->getParent())) continue; return false; } |

