[PATCH] D93065: [InstCombine] Disable optimizations of select instructions that causes propagation of poison values
Nuno Lopes via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Dec 17 11:48:34 PST 2020
nlopes added a comment.
Using freeze loses information (if some of the inputs was poison). Plus It requires an extra op.
If we canonicalize around select there's no loss of information and it's just 1 instruction.
The disadvantage is that then we have 2 ways or doing boolean ANDs/ORs. Though most analyses can be patched easily, as most LLVM analyses' results are of the form "x has property foo unless it's poison". So for those analyses using and/or or select is the same (as the only difference between these is propagation of poison).
Other analyses/optimization can learn about select as needed.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D93065/new/
https://reviews.llvm.org/D93065
More information about the llvm-commits
mailing list