quick fix for PR13006, will check in testcase later.

llvm-svn: 157813
This commit is contained in:
Chris Lattner 2012-06-01 15:02:52 +00:00
parent 55f2ca9b27
commit cc84e6d2b5
1 changed files with 3 additions and 1 deletions

View File

@ -332,7 +332,9 @@ bool llvm::isInTailCallPosition(ImmutableCallSite CS, Attributes CalleeRetAttr,
// see if each is transparent.
for (unsigned i = 0, e =cast<StructType>(RetVal->getType())->getNumElements();
i != e; ++i) {
const Value *InScalar = getNoopInput(FindInsertedValue(RetVal, i), TLI);
const Value *InScalar = FindInsertedValue(RetVal, i);
if (InScalar == 0) return false;
InScalar = getNoopInput(InScalar, TLI);
// If the scalar value being inserted is an extractvalue of the right index
// from the call, then everything is good.