mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-12-12 05:56:28 +00:00
Fix PR33878: BasicAA incorrectly assumes different address spaces don't alias
Remove code that assumed that a nullptr of address space != 0 couldnt alias with a non-null pointer. This is incorrect, since nothing can be concluded about a null pointer in an address space != 0. This code was written before address spaces were introduced Differential Revision: https://reviews.llvm.org/D37518 llvm-svn: 312648
This commit is contained in:
parent
2ab1485e52
commit
20aad04ccc
@ -1590,11 +1590,6 @@ AliasResult BasicAAResult::aliasCheck(const Value *V1, uint64_t V1Size,
|
||||
(isa<Argument>(O2) && isIdentifiedFunctionLocal(O1)))
|
||||
return NoAlias;
|
||||
|
||||
// Most objects can't alias null.
|
||||
if ((isa<ConstantPointerNull>(O2) && isKnownNonNull(O1)) ||
|
||||
(isa<ConstantPointerNull>(O1) && isKnownNonNull(O2)))
|
||||
return NoAlias;
|
||||
|
||||
// If one pointer is the result of a call/invoke or load and the other is a
|
||||
// non-escaping local object within the same function, then we know the
|
||||
// object couldn't escape to a point where the call could return it.
|
||||
|
Loading…
Reference in New Issue
Block a user