[PATCH] D113141: [InstCombine] Relax and reorganize one use checks in the ~(a | b) & c

Stanislav Mekhanoshin via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Nov 3 13:22:31 PDT 2021


rampitec created this revision.
rampitec added reviewers: spatel, lebedev.ri.
Herald added a subscriber: hiraditya.
rampitec requested review of this revision.
Herald added a project: LLVM.

Since there is just a single check for LHS in ~(A | B) & C | ...
transforms and multiple RHS checks inside with more coming I am
removing m_OneUse checks for LHS and adding new checks for RHS.
This is non essential as long as there is total benefit.

In addition (~(A | B) & C) | (~(A | C) & B) --> (B ^ C) & ~A
checks were overly restrictive, it should be good without any
additional checks.


https://reviews.llvm.org/D113141

Files:
  llvm/lib/Transforms/InstCombine/InstCombineAndOrXor.cpp
  llvm/test/Transforms/InstCombine/and-xor-or.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D113141.384567.patch
Type: text/x-patch
Size: 5350 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20211103/da744fff/attachment.bin>


More information about the llvm-commits mailing list