[PATCH] D114996: [InstSimplify] Add logic `or` fold
Sanjay Patel via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Dec 3 15:13:50 PST 2021
spatel accepted this revision.
spatel added a comment.
This revision is now accepted and ready to land.
LGTM - thanks! See inline for one very minor comment.
================
Comment at: llvm/lib/Analysis/InstructionSimplify.cpp:2229
+ // (A ^ B) | (~A | B) --> -1
+ // (A ^ B) | (B | ~A) --> -1
----------------
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.
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