[PATCH] D159510: [InstCombine] Optimize 'xor-and-select' sequence to 'or' for bool
Noah Goldstein via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Sep 19 11:01:05 PDT 2023
goldstein.w.n added inline comments.
================
Comment at: llvm/lib/Transforms/InstCombine/InstCombineSelect.cpp:3184
+ }
+
return nullptr;
----------------
goldstein.w.n wrote:
> 1) You can also do `and` case: https://alive2.llvm.org/ce/z/adHMjn (if the ~ op is the trueval).
> 2) This probably belongs in `foldSelectOfBools`.
Actually should be able to handle all 4 of these cases:
https://alive2.llvm.org/ce/z/BgAFyN
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D159510/new/
https://reviews.llvm.org/D159510
More information about the llvm-commits
mailing list