[PATCH] D104648: [Mem2Reg] Use poison instead of undef for read of uninitialized memory
Juneyoung Lee via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Jun 21 11:36:26 PDT 2021
aqjune added a comment.
This is a big change because AFAIK clang intentionally encodes the value of uninitialized variables in a benign way.
For example: https://godbolt.org/z/EYjasxM1M is optimized to 0 even if it is undef ^ undef = undef. If poison is used, this won't work.
I think that to switch to poison reasonable performance benefit should be shown. I have a patch that makes poison propagate better, which will help this change.
BTW, do you have any idea about the failures happening at clang unit tests?
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D104648/new/
https://reviews.llvm.org/D104648
More information about the llvm-commits
mailing list