summaryrefslogtreecommitdiffstats
path: root/llvm/lib/CodeGen
diff options
context:
space:
mode:
authorReid Spencer <rspencer@reidspencer.com>2007-01-03 05:03:05 +0000
committerReid Spencer <rspencer@reidspencer.com>2007-01-03 05:03:05 +0000
commit2a34b91666be9e6cae82ae7cf3a3065847592f20 (patch)
tree5fa79273b894f3e3db7cc2cffde68fdc8914a895 /llvm/lib/CodeGen
parent0917adf61438ec00be95e82f26acc1bed8904ef6 (diff)
downloadbcm5719-llvm-2a34b91666be9e6cae82ae7cf3a3065847592f20.tar.gz
bcm5719-llvm-2a34b91666be9e6cae82ae7cf3a3065847592f20.zip
Restore previous behavior of defaulting to ZEXT. This works around two
things: (1) preventing PR1071 and (2) working around missing parameter attributes for bool type. (2) will be fixed shortly. When PR1071 is fixed, this patch should be undone. llvm-svn: 32831
Diffstat (limited to 'llvm/lib/CodeGen')
-rw-r--r--llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp9
1 files changed, 2 insertions, 7 deletions
diff --git a/llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp b/llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp
index 5fb21a51ecc..70ff6d9584f 100644
--- a/llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp
+++ b/llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp
@@ -766,17 +766,12 @@ void SelectionDAGLowering::visitRet(ReturnInst &I) {
else
TmpVT = MVT::i32;
const FunctionType *FTy = I.getParent()->getParent()->getFunctionType();
- ISD::NodeType ExtendKind = ISD::ANY_EXTEND;
+ ISD::NodeType ExtendKind = ISD::ZERO_EXTEND; // FIXME: ANY_EXTEND?
if (FTy->paramHasAttr(0, FunctionType::SExtAttribute))
ExtendKind = ISD::SIGN_EXTEND;
if (FTy->paramHasAttr(0, FunctionType::ZExtAttribute))
ExtendKind = ISD::ZERO_EXTEND;
- if (ExtendKind == ISD::ANY_EXTEND)
- // There was no specification for extension in the parameter attributes
- // so we will just let the legalizer do the ANY_EXTEND
- ;
- else
- RetOp = DAG.getNode(ExtendKind, TmpVT, RetOp);
+ RetOp = DAG.getNode(ExtendKind, TmpVT, RetOp);
}
NewValues.push_back(RetOp);
NewValues.push_back(DAG.getConstant(false, MVT::i32));
OpenPOWER on IntegriCloud