aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--lib/Target/SparcV9/RegAlloc/PhyRegAlloc.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/lib/Target/SparcV9/RegAlloc/PhyRegAlloc.cpp b/lib/Target/SparcV9/RegAlloc/PhyRegAlloc.cpp
index 02f18fc738..bbbaee8822 100644
--- a/lib/Target/SparcV9/RegAlloc/PhyRegAlloc.cpp
+++ b/lib/Target/SparcV9/RegAlloc/PhyRegAlloc.cpp
@@ -204,8 +204,9 @@ void PhyRegAlloc::setCallInterferences(const MachineInstr *MInst,
// That has a call interference because it conflicts with outgoing args.
if (const Value *AddrVal = argDesc->getIndirectFuncPtr()) {
LiveRange *AddrValLR = LRI->getLiveRangeForValue( AddrVal );
- assert( AddrValLR && "No LR for indirect addr val of call");
- AddrValLR->setCallInterference();
+ // LR can be null if the function pointer is a constant.
+ if (AddrValLR)
+ AddrValLR->setCallInterference();
}
}