[llvm-commits] CVS: llvm/lib/CodeGen/RegAlloc/PhyRegAlloc.cpp

Vikram Adve vadve at cs.uiuc.edu
Sat Sep 28 12:03:01 PDT 2002


Changes in directory llvm/lib/CodeGen/RegAlloc:

PhyRegAlloc.cpp updated: 1.76 -> 1.77

---
Log message:

Fixed incorrect assertion: spill code for function ptr should be
handled like normal operands, not like other call arguments.


---
Diffs of the changes:

Index: llvm/lib/CodeGen/RegAlloc/PhyRegAlloc.cpp
diff -u llvm/lib/CodeGen/RegAlloc/PhyRegAlloc.cpp:1.76 llvm/lib/CodeGen/RegAlloc/PhyRegAlloc.cpp:1.77
--- llvm/lib/CodeGen/RegAlloc/PhyRegAlloc.cpp:1.76	Sun Sep 15 02:07:55 2002
+++ llvm/lib/CodeGen/RegAlloc/PhyRegAlloc.cpp	Sat Sep 28 12:02:40 2002
@@ -592,9 +592,10 @@
 				       const BasicBlock *BB,
 				       const unsigned OpNum) {
 
-  assert(! TM.getInstrInfo().isCall(MInst->getOpCode()) &&
-	 (! TM.getInstrInfo().isReturn(MInst->getOpCode())) &&
-	 "Arg of a call/ret must be handled elsewhere");
+  assert((! TM.getInstrInfo().isCall(MInst->getOpCode()) || OpNum == 0) &&
+         "Outgoing arg of a call must be handled elsewhere (func arg ok)");
+  assert(! TM.getInstrInfo().isReturn(MInst->getOpCode()) &&
+	 "Return value of a ret must be handled elsewhere");
 
   MachineOperand& Op = MInst->getOperand(OpNum);
   bool isDef =  MInst->operandIsDefined(OpNum);





More information about the llvm-commits mailing list