[PATCH] D105392: [InstCombine] Add optimization to prevent poison from being propagated.
Hyeongyu Kim via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Sat Jul 3 02:48:44 PDT 2021
hyeongyukim added a comment.
In D105392#2856695 <https://reviews.llvm.org/D105392#2856695>, @nikic wrote:
> This optimization is unnecessarily specific to the load + and + icmp combination. I would expect it to go something like this: If the freeze operand is a) one-use, b) does not produce poison, c) has all but one guaranteed-non-poison operands, then push the freeze through to the one operand that is not guaranteed-non-poison. Recursively, this will push the freeze first through the icmp and then the and, but also work for other instruction sequences.
That's a good point!
I will improve my patch to deal with more cases.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D105392/new/
https://reviews.llvm.org/D105392
More information about the llvm-commits
mailing list