[llvm] [SCEVAA] Enhance SCEVAAResult::alias() to handle two pointers with different pointer bases (PR #91453)
Nikita Popov via llvm-commits
llvm-commits at lists.llvm.org
Wed May 29 03:07:46 PDT 2024
================
@@ -61,6 +61,20 @@ AliasResult SCEVAAResult::alias(const MemoryLocation &LocA,
? static_cast<uint64_t>(LocB.Size.getValue())
: MemoryLocation::UnknownSize);
+ // Firstly, try to convert the two pointers into ptrtoint expressions to
+ // handle two pointers with different pointer bases.
+ // Either both pointers are used with ptrtoint or neither, so we can't end
+ // up with a ptr + int mix (not entirely sure whether it's possible for just
+ // one of the conversions to fail).
----------------
nikic wrote:
```suggestion
// up with a ptr + int mix.
```
I don't think this belongs in a code comment :)
https://github.com/llvm/llvm-project/pull/91453
More information about the llvm-commits
mailing list