summaryrefslogtreecommitdiffstats
path: root/llvm/lib
diff options
context:
space:
mode:
authorJakob Stoklund Olesen <stoklund@2pi.dk>2012-09-27 16:34:19 +0000
committerJakob Stoklund Olesen <stoklund@2pi.dk>2012-09-27 16:34:19 +0000
commit1d19582a8f0241c7128d9505d5c49f72b37e6930 (patch)
tree8ecfeef556d0c96a573b8add355313d7339e740b /llvm/lib
parentebca38a4c5f279caf6b3aa38adea5c2f005fc9cd (diff)
downloadbcm5719-llvm-1d19582a8f0241c7128d9505d5c49f72b37e6930.tar.gz
bcm5719-llvm-1d19582a8f0241c7128d9505d5c49f72b37e6930.zip
Avoid dereferencing a NULL pointer.
Fixes PR13943. llvm-svn: 164778
Diffstat (limited to 'llvm/lib')
-rw-r--r--llvm/lib/CodeGen/LiveRangeEdit.cpp2
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;
}
OpenPOWER on IntegriCloud