Only pass 'returned' to target-specific lowering code when the value of entire register is guaranteed to be preserved.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@180825 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Stephen Lin
2013-04-30 22:49:28 +00:00
parent 8e229c24ed
commit 3484da9479
4 changed files with 220 additions and 92 deletions

View File

@ -269,8 +269,6 @@ static bool sameNoopInput(const Value *V1, const Value *V2,
i != e; ++i) {
unsigned attrInd = i - I->op_begin() + 1;
if (cast<CallInst>(I)->paramHasAttr(attrInd, Attribute::Returned) &&
!cast<CallInst>(I)->paramHasAttr(attrInd, Attribute::ZExt) &&
!cast<CallInst>(I)->paramHasAttr(attrInd, Attribute::SExt) &&
isNoopBitcast((*i)->getType(), I->getType(), TLI)) {
NoopInput = *i;
break;
@ -284,8 +282,6 @@ static bool sameNoopInput(const Value *V1, const Value *V2,
i != e; ++i) {
unsigned attrInd = i - I->op_begin() + 1;
if (cast<InvokeInst>(I)->paramHasAttr(attrInd, Attribute::Returned) &&
!cast<InvokeInst>(I)->paramHasAttr(attrInd, Attribute::ZExt) &&
!cast<InvokeInst>(I)->paramHasAttr(attrInd, Attribute::SExt) &&
isNoopBitcast((*i)->getType(), I->getType(), TLI)) {
NoopInput = *i;
break;