summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Analysis/BasicAliasAnalysis.cpp
diff options
context:
space:
mode:
authorHal Finkel <hfinkel@anl.gov>2016-12-15 05:09:15 +0000
committerHal Finkel <hfinkel@anl.gov>2016-12-15 05:09:15 +0000
commit39fed399e1ef4c1baad5c411bcd22fb5873aea5d (patch)
tree24eb58fd1debc838567831480c4df8e4262dff14 /llvm/lib/Analysis/BasicAliasAnalysis.cpp
parentd7389d626109cc0d611056da8238fa502e12f57c (diff)
downloadbcm5719-llvm-39fed399e1ef4c1baad5c411bcd22fb5873aea5d.tar.gz
bcm5719-llvm-39fed399e1ef4c1baad5c411bcd22fb5873aea5d.zip
Fix argument attribute queries with bundle operands
When iterating over data operands in AA, don't make argument-attribute-specific queries on bundle operands. Trying to fix self hosting... llvm-svn: 289765
Diffstat (limited to 'llvm/lib/Analysis/BasicAliasAnalysis.cpp')
-rw-r--r--llvm/lib/Analysis/BasicAliasAnalysis.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/llvm/lib/Analysis/BasicAliasAnalysis.cpp b/llvm/lib/Analysis/BasicAliasAnalysis.cpp
index e79092b0acd..55498432e11 100644
--- a/llvm/lib/Analysis/BasicAliasAnalysis.cpp
+++ b/llvm/lib/Analysis/BasicAliasAnalysis.cpp
@@ -740,7 +740,8 @@ ModRefInfo BasicAAResult::getModRefInfo(ImmutableCallSite CS,
// pointer were passed to arguments that were neither of these, then it
// couldn't be no-capture.
if (!(*CI)->getType()->isPointerTy() ||
- (!CS.doesNotCapture(OperandNo) && !CS.isByValArgument(OperandNo)))
+ (!CS.doesNotCapture(OperandNo) &&
+ OperandNo < CS.getNumArgOperands() && !CS.isByValArgument(OperandNo)))
continue;
// If this is a no-capture pointer argument, see if we can tell that it
OpenPOWER on IntegriCloud