[PATCH] D122152: [InstCombine] Fold two select patterns into and-or
Sanjay Patel via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Mar 28 07:21:03 PDT 2022
spatel added a comment.
LGTM.
It's not clear how much of 'or' bitwise logic combining we want to replicate for select-of-bools, but this seems ok for now.
Ie, if we are willing to freeze, then any select-of-bools can be converted to logic ops. If the condition is itself composed of bitwise logic with a repeated value, then there's probably some logic reduction that can happen. For example if we change the 'not' on one of the patterns here:
https://alive2.llvm.org/ce/z/BsyhPk
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D122152/new/
https://reviews.llvm.org/D122152
More information about the llvm-commits
mailing list