[PATCH] D112966: [InstCombine] (~a & b & c) | ~(a | b | c) -> ~(a | (b ^ c))
Sanjay Patel via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Dec 9 05:30:56 PST 2021
spatel accepted this revision.
spatel added a comment.
This revision is now accepted and ready to land.
LGTM - admittedly, I didn't try to line up all of the possible patterns with the tests because there are so many combinations.
So this is at the limit of what we can do in instcombine pattern-matching, but I don't see any way to reduce the complexity.
================
Comment at: llvm/lib/Transforms/InstCombine/InstCombineAndOrXor.cpp:1807-1808
+ // (~A | B | C) & ~(A & B & C) -> (~A | (B ^ C))
+ // TODO: One use checks are conservative. We just need to check that a total
+ // number of multiple used values.
+ if (match(Op0,
----------------
Comment seems truncated from the similar code comment above here.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D112966/new/
https://reviews.llvm.org/D112966
More information about the llvm-commits
mailing list