mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-08-18 12:29:21 +00: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.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@47317 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
61c24e96b1
commit
851bfff50f
@ -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)
|
||||
|
Loading…
Reference in New Issue
Block a user