Fixed incorrect assertion: spill code for function ptr should be

handled like normal operands, not like other call arguments.

llvm-svn: 3967
This commit is contained in:
Vikram S. Adve 2002-09-28 17:02:40 +00:00
parent d76d82b40f
commit 8fef3b8033
1 changed files with 4 additions and 3 deletions

View File

@ -592,9 +592,10 @@ void PhyRegAlloc::insertCode4SpilledLR(const LiveRange *LR,
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);