1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-20 19:42:54 +02:00

In addition to arguments passed to it, memcpy (and all other calls) can ModRef pointers that alias their arguments as well. This fixes PR2057.

llvm-svn: 47317
This commit is contained in:
Owen Anderson 2008-02-19 06:47:18 +00:00
parent dbc264003e
commit 3efff61819

View File

@ -263,7 +263,8 @@ BasicAliasAnalysis::getModRefInfo(CallSite CS, Value *P, unsigned Size) {
for (CallSite::arg_iterator CI = CS.arg_begin(), CE = CS.arg_end();
CI != CE; ++CI)
if (isa<PointerType>((*CI)->getType()) &&
getUnderlyingObject(*CI) == P)
( getUnderlyingObject(*CI) == P ||
alias(cast<Value>(CI), ~0ULL, P, ~0ULL) != NoAlias) )
passedAsArg = true;
if (!passedAsArg)