[PATCH] D144057: [GVN] permit GVN of non-local loads for ASAN unless undef is produced
Nick Desaulniers via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Feb 15 16:09:34 PST 2023
nickdesaulniers added a comment.
In D144057#4128142 <https://reviews.llvm.org/D144057#4128142>, @nikic wrote:
> I don't think this is right as implemented. Imagine you have `if (...) { store v, p } x = load p`. GVN would convert this to something like `x = phi(v, undef)`. With asan, we want this to report if the if is not taken. However, I believe that your checks will permit the transform, because the load folding result is not literally undef (but is still undef on one path).
Is this what you're imagining? https://godbolt.org/z/Pc3YezE44
Seems like ASAN already misses that? In this case, we go to replace the load with alloca, so adding a check remedies that case. But it doesn't change the fact that asan misses that C test case.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D144057/new/
https://reviews.llvm.org/D144057
More information about the llvm-commits
mailing list