aboutsummaryrefslogtreecommitdiff
path: root/lib/Target/PowerPC/PPCISelLowering.cpp
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2005-09-02 00:47:05 +0000
committerChris Lattner <sabre@nondot.org>2005-09-02 00:47:05 +0000
commit5b3224fe7ecafd486b75ebfa113a95783112ec3d (patch)
tree78241222ba5c653df418dde944b4e73f635ab788 /lib/Target/PowerPC/PPCISelLowering.cpp
parent5ab6f5fe666d0e3403d9b777324d1a1999118153 (diff)
Revert the previous patch which causes a mysterious regression in toast.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23207 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Target/PowerPC/PPCISelLowering.cpp')
-rw-r--r--lib/Target/PowerPC/PPCISelLowering.cpp18
1 files changed, 2 insertions, 16 deletions
diff --git a/lib/Target/PowerPC/PPCISelLowering.cpp b/lib/Target/PowerPC/PPCISelLowering.cpp
index 8490adb3c3..5b77784819 100644
--- a/lib/Target/PowerPC/PPCISelLowering.cpp
+++ b/lib/Target/PowerPC/PPCISelLowering.cpp
@@ -613,12 +613,8 @@ PPC32TargetLowering::LowerCallTo(SDOperand Chain,
std::vector<MVT::ValueType> RetVals;
MVT::ValueType RetTyVT = getValueType(RetTy);
- MVT::ValueType ActualRetTyVT = RetTyVT;
- if (RetTyVT >= MVT::i1 && RetTyVT <= MVT::i16)
- ActualRetTyVT = MVT::i32; // Promote result to i32.
-
if (RetTyVT != MVT::isVoid)
- RetVals.push_back(ActualRetTyVT);
+ RetVals.push_back(RetTyVT);
RetVals.push_back(MVT::Other);
SDOperand TheCall = SDOperand(DAG.getCall(RetVals,
@@ -626,17 +622,7 @@ PPC32TargetLowering::LowerCallTo(SDOperand Chain,
Chain = TheCall.getValue(RetTyVT != MVT::isVoid);
Chain = DAG.getNode(ISD::CALLSEQ_END, MVT::Other, Chain,
DAG.getConstant(NumBytes, getPointerTy()));
- SDOperand RetVal = TheCall;
-
- // If the result is a small value, add a note so that we keep track of the
- // information about whether it is sign or zero extended.
- if (RetTyVT != ActualRetTyVT) {
- RetVal = DAG.getNode(RetTy->isSigned() ? ISD::AssertSext : ISD::AssertZext,
- MVT::i32, RetVal, DAG.getValueType(RetTyVT));
- RetVal = DAG.getNode(ISD::TRUNCATE, RetTyVT, RetVal);
- }
-
- return std::make_pair(RetVal, Chain);
+ return std::make_pair(TheCall, Chain);
}
SDOperand PPC32TargetLowering::LowerVAStart(SDOperand Chain, SDOperand VAListP,