summaryrefslogtreecommitdiffstats
path: root/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuild.cpp
diff options
context:
space:
mode:
authorAnton Korobeynikov <asl@math.spbu.ru>2009-07-16 13:35:48 +0000
committerAnton Korobeynikov <asl@math.spbu.ru>2009-07-16 13:35:48 +0000
commitbbd751e410ca8c05610e06c0881dcad298967c14 (patch)
treedaa8b13b37348927114393a25eb840b092388896 /llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuild.cpp
parent5618d808e0e8dcdd160a4d64a861316558abf9a0 (diff)
downloadbcm5719-llvm-bbd751e410ca8c05610e06c0881dcad298967c14.tar.gz
bcm5719-llvm-bbd751e410ca8c05610e06c0881dcad298967c14.zip
Propagate return result extension type
llvm-svn: 75925
Diffstat (limited to 'llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuild.cpp')
-rw-r--r--llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuild.cpp7
1 files changed, 7 insertions, 0 deletions
diff --git a/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuild.cpp b/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuild.cpp
index 4b2ee0e854f..b1589d4c096 100644
--- a/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuild.cpp
+++ b/llvm/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));
OpenPOWER on IntegriCloud