Legalizer doesn't do an ANY_EXTEND if we don't ask for one so make sure
authorReid Spencer <rspencer@reidspencer.com>
Wed, 3 Jan 2007 16:49:33 +0000 (16:49 +0000)
committerReid Spencer <rspencer@reidspencer.com>
Wed, 3 Jan 2007 16:49:33 +0000 (16:49 +0000)
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

lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp

index 70ff6d9584ff9101d21fd575361bd9c28f73039e..ce0038d6b8778e7bb316f8e9a839844dee1f13fb 100644 (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))