[PATCH] D143118: [Loads] Return false in canReplacePointersIfEqual helper for non-aliasing pointers
Nikita Popov via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Feb 2 00:41:35 PST 2023
nikic requested changes to this revision.
nikic added a comment.
This revision now requires changes to proceed.
I don't think this is the correct check to do, and I also don't particularly want to introduce AA queries for this. The correct check is whether getUnderlyingObject(A) == getUnderlyingObject(B), in reasonable approximation. (There are more cases that are safe, e.g. a null pointer can be replaced with anything, but they are probably not very useful.)
I believe that if we actually want to fix this class of problems (which goes beyond GVN), we should fix it properly, and that starts with using the right predicate so we get a correct idea of the performance regressions we should expect.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D143118/new/
https://reviews.llvm.org/D143118
More information about the llvm-commits
mailing list