summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBruno Cardoso Lopes <bruno.cardoso@gmail.com>2008-06-01 03:49:39 +0000
committerBruno Cardoso Lopes <bruno.cardoso@gmail.com>2008-06-01 03:49:39 +0000
commitbdedc148a8b7fda14f506e4247fb278ef5719f33 (patch)
treea95154d56a69b39a1bb6bd8f01a91ca046bb3ded
parente643e12313dde41f4431276236df37f7fc0fb1d0 (diff)
downloadbcm5719-llvm-bdedc148a8b7fda14f506e4247fb278ef5719f33.tar.gz
bcm5719-llvm-bdedc148a8b7fda14f506e4247fb278ef5719f33.zip
Fixed flag issue that was generating infinite loop while in list scheduling.
llvm-svn: 51833
-rw-r--r--llvm/lib/Target/Mips/MipsISelLowering.cpp12
1 files changed, 7 insertions, 5 deletions
diff --git a/llvm/lib/Target/Mips/MipsISelLowering.cpp b/llvm/lib/Target/Mips/MipsISelLowering.cpp
index 5ea9cdd9c25..5f05a6f1e72 100644
--- a/llvm/lib/Target/Mips/MipsISelLowering.cpp
+++ b/llvm/lib/Target/Mips/MipsISelLowering.cpp
@@ -365,6 +365,12 @@ LowerCCCCallTo(SDOperand Op, SelectionDAG &DAG, unsigned CC)
Chain = DAG.getNode(MipsISD::JmpLink, NodeTys, &Ops[0], Ops.size());
InFlag = Chain.getValue(1);
+ Chain = DAG.getCALLSEQ_END(Chain,
+ DAG.getConstant(NumBytes, getPointerTy()),
+ DAG.getConstant(0, getPointerTy()),
+ InFlag);
+ InFlag = Chain.getValue(1);
+
// Create a stack location to hold GP when PIC is used. This stack
// location is used on function prologue to save GP and also after all
// emited CALL's to restore GP.
@@ -391,14 +397,10 @@ LowerCCCCallTo(SDOperand Op, SelectionDAG &DAG, unsigned CC)
Chain = GPLoad.getValue(1);
Chain = DAG.getCopyToReg(Chain, DAG.getRegister(Mips::GP, MVT::i32),
GPLoad, SDOperand(0,0));
+ InFlag = Chain.getValue(1);
}
// Create the CALLSEQ_END node.
- Chain = DAG.getCALLSEQ_END(Chain,
- DAG.getConstant(NumBytes, getPointerTy()),
- DAG.getConstant(0, getPointerTy()),
- InFlag);
- InFlag = Chain.getValue(1);
// Handle result values, copying them out of physregs into vregs that we
// return.
OpenPOWER on IntegriCloud