PR10628: Fix getModRefInfo so it queries the underlying alias() implementation correctly while checking nocapture calls.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@140666 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Eli Friedman
2011-09-28 00:34:27 +00:00
parent 56ab875e55
commit e6fadced87
2 changed files with 17 additions and 2 deletions

View File

@@ -714,7 +714,7 @@ BasicAliasAnalysis::getModRefInfo(ImmutableCallSite CS,
// is impossible to alias the pointer we're checking. If not, we have to
// assume that the call could touch the pointer, even though it doesn't
// escape.
if (!isNoAlias(Location(cast<Value>(CI)), Loc)) {
if (!isNoAlias(Location(*CI), Location(Object))) {
PassedAsArg = true;
break;
}