[PATCH] D77868: [InstSimplify] fold select of bools using bitwise logic
Sanjay Patel via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Apr 10 07:24:04 PDT 2020
spatel added a comment.
In D77868#1974228 <https://reviews.llvm.org/D77868#1974228>, @nikic wrote:
> What is the motivation for having this fold partially (only if recursively simplifiable) in InstSimplify, rather than doing the full fold in InstCombine?
If the logic can be simplified, then that makes it poison-safe. Ie, if the logic op simplifies, that means the logic op must be filtering out a poisoned value the same as we would expect of a select. Does that make sense, or do you know of a counter-example?
But not sure if that's the question: handle all 4 of the logic-op possibilities (and-not/or-not) rather than just and/or in instcombine rather than here?
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D77868/new/
https://reviews.llvm.org/D77868
More information about the llvm-commits
mailing list