[InstCombine] Try to sink `not` of one operand of logical operation into another...
authorRoman Lebedev <lebedev.ri@gmail.com>
Sun, 18 Dec 2022 21:44:26 +0000 (00:44 +0300)
committerRoman Lebedev <lebedev.ri@gmail.com>
Sun, 18 Dec 2022 22:10:16 +0000 (01:10 +0300)
commit9f0c9e4725f6a6f1cad857102dc70fce759e610d
tree485453be73abc604dc548fb23573a2b618c952f6
parent02a3e22ca2c3cf0653ffccbee02ce22abd9d0731
[InstCombine] Try to sink `not` of one operand of logical operation into another hand

Matches what we do for binary operations, but a special care needs
is needed to preserve operand order, as the logical operations
are not strictly commutative!
llvm/include/llvm/IR/IRBuilder.h
llvm/lib/Transforms/InstCombine/InstCombineAndOrXor.cpp
llvm/lib/Transforms/InstCombine/InstCombineInternal.h
llvm/lib/Transforms/InstCombine/InstCombineSelect.cpp
llvm/test/Transforms/InstCombine/sink-not-into-another-hand-of-and.ll
llvm/test/Transforms/InstCombine/sink-not-into-another-hand-of-logical-and.ll
llvm/test/Transforms/InstCombine/sink-not-into-another-hand-of-logical-or.ll
llvm/test/Transforms/InstCombine/sink-not-into-another-hand-of-or.ll