[llvm] [SCEVAA] Enhance SCEVAAResult::alias() to handle two pointers with different pointer bases (PR #91453)
via llvm-commits
llvm-commits at lists.llvm.org
Wed May 29 03:43:20 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).
----------------
csstormq wrote:
It has been fixed. Thanks a lot for your suggestion.
https://github.com/llvm/llvm-project/pull/91453
More information about the llvm-commits
mailing list