From 376dd212f9142cd0f0b03e0b6296b2df7208bb9a Mon Sep 17 00:00:00 2001 From: Reid Spencer Date: Wed, 3 Jan 2007 05:03:05 +0000 Subject: [PATCH] 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. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32831 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp b/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp index 5fb21a51ecc..70ff6d9584f 100644 --- a/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp +++ b/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));