diff options
author | Chris Lattner <sabre@nondot.org> | 2008-10-11 22:08:30 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2008-10-11 22:08:30 +0000 |
commit | fe5d4021d0884e4cb94a7bb688fa0b02950ee29c (patch) | |
tree | a37bbcd7f9c678ffb63af61962f1d0fb13b345a9 /lib/Target/PowerPC | |
parent | a1f63bb6de7de331d6672e59caca6db6ea656baa (diff) | |
download | external_llvm-fe5d4021d0884e4cb94a7bb688fa0b02950ee29c.zip external_llvm-fe5d4021d0884e4cb94a7bb688fa0b02950ee29c.tar.gz external_llvm-fe5d4021d0884e4cb94a7bb688fa0b02950ee29c.tar.bz2 |
Change CALLSEQ_BEGIN and CALLSEQ_END to take TargetConstant's as
parameters instead of raw Constants. This prevents the constants from
being selected by the isel pass, fixing PR2735.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@57385 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Target/PowerPC')
-rw-r--r-- | lib/Target/PowerPC/PPCISelLowering.cpp | 12 | ||||
-rw-r--r-- | lib/Target/PowerPC/PPCInstrInfo.td | 4 |
2 files changed, 7 insertions, 9 deletions
diff --git a/lib/Target/PowerPC/PPCISelLowering.cpp b/lib/Target/PowerPC/PPCISelLowering.cpp index a240a15..0cb77c0 100644 --- a/lib/Target/PowerPC/PPCISelLowering.cpp +++ b/lib/Target/PowerPC/PPCISelLowering.cpp @@ -2142,8 +2142,7 @@ SDValue PPCTargetLowering::LowerCALL(SDValue Op, SelectionDAG &DAG, // Adjust the stack pointer for the new arguments... // These operations are automatically eliminated by the prolog/epilog pass - Chain = DAG.getCALLSEQ_START(Chain, - DAG.getConstant(NumBytes, PtrVT)); + Chain = DAG.getCALLSEQ_START(Chain, DAG.getIntPtrConstant(NumBytes, true)); SDValue CallSeqStart = Chain; // Load the return address and frame pointer so it can be move somewhere else @@ -2476,8 +2475,8 @@ SDValue PPCTargetLowering::LowerCALL(SDValue Op, SelectionDAG &DAG, SmallVector<SDValue, 8> CallSeqOps; SDVTList CallSeqNodeTys = DAG.getVTList(MVT::Other, MVT::Flag); CallSeqOps.push_back(Chain); - CallSeqOps.push_back(DAG.getIntPtrConstant(NumBytes)); - CallSeqOps.push_back(DAG.getIntPtrConstant(0)); + CallSeqOps.push_back(DAG.getIntPtrConstant(NumBytes, true)); + CallSeqOps.push_back(DAG.getIntPtrConstant(0, true)); if (InFlag.getNode()) CallSeqOps.push_back(InFlag); Chain = DAG.getNode(ISD::CALLSEQ_END, CallSeqNodeTys, &CallSeqOps[0], @@ -2564,9 +2563,8 @@ SDValue PPCTargetLowering::LowerCALL(SDValue Op, SelectionDAG &DAG, Chain = DAG.getNode(CallOpc, NodeTys, &Ops[0], Ops.size()); InFlag = Chain.getValue(1); - Chain = DAG.getCALLSEQ_END(Chain, - DAG.getConstant(NumBytes, PtrVT), - DAG.getConstant(BytesCalleePops, PtrVT), + Chain = DAG.getCALLSEQ_END(Chain, DAG.getIntPtrConstant(NumBytes, true), + DAG.getIntPtrConstant(BytesCalleePops, true), InFlag); if (TheCall->getValueType(0) != MVT::Other) InFlag = Chain.getValue(1); diff --git a/lib/Target/PowerPC/PPCInstrInfo.td b/lib/Target/PowerPC/PPCInstrInfo.td index d2f7d18..947d140 100644 --- a/lib/Target/PowerPC/PPCInstrInfo.td +++ b/lib/Target/PowerPC/PPCInstrInfo.td @@ -342,10 +342,10 @@ let hasCtrlDep = 1 in { let Defs = [R1], Uses = [R1] in { def ADJCALLSTACKDOWN : Pseudo<(outs), (ins u16imm:$amt), "${:comment} ADJCALLSTACKDOWN", - [(callseq_start imm:$amt)]>; + [(callseq_start timm:$amt)]>; def ADJCALLSTACKUP : Pseudo<(outs), (ins u16imm:$amt1, u16imm:$amt2), "${:comment} ADJCALLSTACKUP", - [(callseq_end imm:$amt1, imm:$amt2)]>; + [(callseq_end timm:$amt1, timm:$amt2)]>; } def UPDATE_VRSAVE : Pseudo<(outs GPRC:$rD), (ins GPRC:$rS), |