diff options
Diffstat (limited to 'lib/CodeGen/Analysis.cpp')
-rw-r--r-- | lib/CodeGen/Analysis.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/CodeGen/Analysis.cpp b/lib/CodeGen/Analysis.cpp index 1a8968dd28..447f3981b5 100644 --- a/lib/CodeGen/Analysis.cpp +++ b/lib/CodeGen/Analysis.cpp @@ -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. |