diff options
author | Anton Korobeynikov <asl@math.spbu.ru> | 2009-07-16 13:35:48 +0000 |
---|---|---|
committer | Anton Korobeynikov <asl@math.spbu.ru> | 2009-07-16 13:35:48 +0000 |
commit | 0692fabb4e681da2907361346ff984290dbb3e40 (patch) | |
tree | 81c8f698f5ff4b7769844c7295488285993d0bfd /lib/CodeGen/SelectionDAG/SelectionDAGBuild.cpp | |
parent | 3f2122bea82d2dc4331abcc4315e0143060b76c5 (diff) |
Propagate return result extension type
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@75925 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/SelectionDAG/SelectionDAGBuild.cpp')
-rw-r--r-- | lib/CodeGen/SelectionDAG/SelectionDAGBuild.cpp | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/lib/CodeGen/SelectionDAG/SelectionDAGBuild.cpp b/lib/CodeGen/SelectionDAG/SelectionDAGBuild.cpp index 4b2ee0e854..b1589d4c09 100644 --- a/lib/CodeGen/SelectionDAG/SelectionDAGBuild.cpp +++ b/lib/CodeGen/SelectionDAG/SelectionDAGBuild.cpp @@ -981,6 +981,13 @@ void SelectionDAGLowering::visitRet(ReturnInst &I) { ISD::ArgFlagsTy Flags = ISD::ArgFlagsTy(); if (F->paramHasAttr(0, Attribute::InReg)) Flags.setInReg(); + + // Propagate extension type if any + if (F->paramHasAttr(0, Attribute::SExt)) + Flags.setSExt(); + else if (F->paramHasAttr(0, Attribute::ZExt)) + Flags.setZExt(); + for (unsigned i = 0; i < NumParts; ++i) { NewValues.push_back(Parts[i]); NewValues.push_back(DAG.getArgFlags(Flags)); |