[PATCH] D114996: [InstSimplify] Add logic `or` fold
Mehrnoosh Heidarpour via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Sat Dec 4 12:05:47 PST 2021
MehrHeidar marked 3 inline comments as done.
MehrHeidar added inline comments.
================
Comment at: llvm/lib/Analysis/InstructionSimplify.cpp:2229
+ // (A ^ B) | (~A | B) --> -1
+ // (A ^ B) | (B | ~A) --> -1
----------------
spatel wrote:
> One more tiny nit - the 'X' in all of these formulas is the first operand of the 'or', but this set of formulas is showing 'X' as the second operand. That is, the inner 'or' that includes the 'not A' operand should be on the left side and the 'A ^ B' should be on the right to match what the code does.
Thank you!
Right, I changed the order of `or` and `xor` in the comments to match the code.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D114996/new/
https://reviews.llvm.org/D114996
More information about the llvm-commits
mailing list