Legalizer doesn't do an ANY_EXTEND if we don't ask for one so make sure

that we default to an ANY_EXTEND if no parameter attribute is set on the
result value of a function.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32836 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Reid Spencer 2007-01-03 16:49:33 +00:00
parent 26a3687d53
commit bcca3405bd

View File

@ -766,7 +766,7 @@ void SelectionDAGLowering::visitRet(ReturnInst &I) {
else
TmpVT = MVT::i32;
const FunctionType *FTy = I.getParent()->getParent()->getFunctionType();
ISD::NodeType ExtendKind = ISD::ZERO_EXTEND; // FIXME: ANY_EXTEND?
ISD::NodeType ExtendKind = ISD::ANY_EXTEND;
if (FTy->paramHasAttr(0, FunctionType::SExtAttribute))
ExtendKind = ISD::SIGN_EXTEND;
if (FTy->paramHasAttr(0, FunctionType::ZExtAttribute))