InstCombine: Add a bunch of combines of the form x | (y ^ z).
authorBenjamin Kramer <benny.kra@googlemail.com>
Sun, 20 Feb 2011 13:23:43 +0000 (13:23 +0000)
committerBenjamin Kramer <benny.kra@googlemail.com>
Sun, 20 Feb 2011 13:23:43 +0000 (13:23 +0000)
commit91e37ef278779c3c8700bbddbb5c9d37739b1716
tree8af592d9d6408992eb6af45dc74fcb3efca98aba
parented9b934f65d82324506f03e2db2834682c7a8914
InstCombine: Add a bunch of combines of the form x | (y ^ z).

We usually catch this kind of optimization through InstSimplify's distributive
magic, but or doesn't distribute over xor in general.

"A | ~(A | B) -> A | ~B" hits 24 times on gcc.c.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@126081 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Transforms/InstCombine/InstCombineAndOrXor.cpp
test/Transforms/InstCombine/or-xor.ll [new file with mode: 0644]