[llvm-commits] [llvm] r94915 - /llvm/trunk/lib/Target/Mips/MipsISelLowering.cpp
Bruno Cardoso Lopes
bruno.cardoso at gmail.com
Sat Jan 30 10:32:07 PST 2010
Author: bruno
Date: Sat Jan 30 12:32:07 2010
New Revision: 94915
URL: http://llvm.org/viewvc/llvm-project?rev=94915&view=rev
Log:
Fix PR6144. Reload GP before the emission of CALLSEQ_END to guarantee the right reload order
Modified:
llvm/trunk/lib/Target/Mips/MipsISelLowering.cpp
Modified: llvm/trunk/lib/Target/Mips/MipsISelLowering.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/Mips/MipsISelLowering.cpp?rev=94915&r1=94914&r2=94915&view=diff
==============================================================================
--- llvm/trunk/lib/Target/Mips/MipsISelLowering.cpp (original)
+++ llvm/trunk/lib/Target/Mips/MipsISelLowering.cpp Sat Jan 30 12:32:07 2010
@@ -834,11 +834,6 @@
Chain = DAG.getNode(MipsISD::JmpLink, dl, NodeTys, &Ops[0], Ops.size());
InFlag = Chain.getValue(1);
- // Create the CALLSEQ_END node.
- Chain = DAG.getCALLSEQ_END(Chain, DAG.getIntPtrConstant(NumBytes, true),
- DAG.getIntPtrConstant(0, true), 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.
@@ -868,6 +863,11 @@
InFlag = Chain.getValue(1);
}
+ // Create the CALLSEQ_END node.
+ Chain = DAG.getCALLSEQ_END(Chain, DAG.getIntPtrConstant(NumBytes, true),
+ DAG.getIntPtrConstant(0, true), InFlag);
+ InFlag = Chain.getValue(1);
+
// Handle result values, copying them out of physregs into vregs that we
// return.
return LowerCallResult(Chain, InFlag, CallConv, isVarArg,
More information about the llvm-commits
mailing list