1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-11-23 19:23:23 +01:00

Propagate return result extension type

llvm-svn: 75925
This commit is contained in:
Anton Korobeynikov 2009-07-16 13:35:48 +00:00
parent 9541db227e
commit 7fbfe92a28

View File

@ -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));