[PATCH] D86395: InstCombine transform pattern "(~A & B) ^ A -> (A | B)" added

Dávid Bolvanský via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Sat Aug 29 09:01:19 PDT 2020


xbolva00 added inline comments.


================
Comment at: llvm/lib/Transforms/InstCombine/InstCombineAndOrXor.cpp:3361
+
+  // A ^ (~A & B)  -->   (A | B)
+  if (match(Op0, m_Value(A)) &&
----------------
xbolva00 wrote:
> Avoid this.
> 
> 
> Use
> 
> if (match(&I, m_c_Xor(......)
> 
> above.
Now you can remove this fold, since previous check ^ handles commutation.


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

https://reviews.llvm.org/D86395



More information about the llvm-commits mailing list