[PATCH] D112955: [InstCombine] (a & ~(b | c)) | ~(a | (b ^ c)) -> (~a & b & c) | ~(b | c)

Stanislav Mekhanoshin via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Nov 2 17:19:05 PDT 2021


rampitec added inline comments.


================
Comment at: llvm/lib/Transforms/InstCombine/InstCombineAndOrXor.cpp:2829
 
+  // (A & ~(B | C)) | ~(A | (B ^ C)) -> (~A & B & C) | ~(B | C)
+  if (match(Op0, m_c_And(m_Value(A),
----------------
I have realized it is essentially the same LHS as above. And then above is the same as another one above. Will combine these, the only real difference is one use counts, but that can be done inside the outer if statement. As the number of patterns grow I have to keep it under control somehow and factor.


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D112955/new/

https://reviews.llvm.org/D112955



More information about the llvm-commits mailing list