Fix bug in PhyRegAlloc::setCallInterferences() handling call through a
authorBrian Gaeke <gaeke@uiuc.edu>
Tue, 24 Aug 2004 06:41:39 +0000 (06:41 +0000)
committerBrian Gaeke <gaeke@uiuc.edu>
Tue, 24 Aug 2004 06:41:39 +0000 (06:41 +0000)
null pointer.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@16013 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Target/SparcV9/RegAlloc/PhyRegAlloc.cpp

index 02f18fc7389fc2f881e265f6c6a97c53a38cd50a..bbbaee8822c5155b15d5e113bca9a4cc683c4051 100644 (file)
@@ -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();
   }
 }