summaryrefslogtreecommitdiffstats
path: root/llvm/lib/CodeGen
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2012-06-01 15:02:52 +0000
committerChris Lattner <sabre@nondot.org>2012-06-01 15:02:52 +0000
commitcc84e6d2b5d35722bfc1b249ce2faa30f7d8437a (patch)
tree379db4771537ea6609384f4a440460fefc627f1b /llvm/lib/CodeGen
parent55f2ca9b27d383e628e38e4f61ce2a8269fe2d07 (diff)
downloadbcm5719-llvm-cc84e6d2b5d35722bfc1b249ce2faa30f7d8437a.tar.gz
bcm5719-llvm-cc84e6d2b5d35722bfc1b249ce2faa30f7d8437a.zip
quick fix for PR13006, will check in testcase later.
llvm-svn: 157813
Diffstat (limited to 'llvm/lib/CodeGen')
-rw-r--r--llvm/lib/CodeGen/Analysis.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/llvm/lib/CodeGen/Analysis.cpp b/llvm/lib/CodeGen/Analysis.cpp
index 1a8968dd284..447f3981b52 100644
--- a/llvm/lib/CodeGen/Analysis.cpp
+++ b/llvm/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.
OpenPOWER on IntegriCloud