diff options
author | Chris Lattner <sabre@nondot.org> | 2012-06-01 15:02:52 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2012-06-01 15:02:52 +0000 |
commit | 74ee0ef6a72c61766523364f7c300c2a2612aae7 (patch) | |
tree | d590b5f89fee22f26bf987afdee34286809e1449 /lib | |
parent | f8d14c4ca3874890cfd8867d9557efca9511c98f (diff) |
quick fix for PR13006, will check in testcase later.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@157813 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib')
-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 1a8968dd284..447f3981b52 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. |