OSDN Git Service

[InstCombine] Make (X|C1)^C2 -> X^(C1^C2) iff X&~C1 == 0 work for splat vectors
authorCraig Topper <craig.topper@intel.com>
Thu, 10 Aug 2017 20:35:34 +0000 (20:35 +0000)
committerCraig Topper <craig.topper@intel.com>
Thu, 10 Aug 2017 20:35:34 +0000 (20:35 +0000)
commit6f60a33be521155a6e3d46b6f00eb0991b0b2613
tree3eb895fea7689c903974166e23da17f0bb6a33ce
parent86c4bd6af913ef4901820b7b11f721c6794337d4
[InstCombine] Make (X|C1)^C2 -> X^(C1^C2) iff X&~C1 == 0 work for splat vectors

This also corrects the description to match what was actually implemented. The old comment said X^(C1|C2), but it implemented X^((C1|C2)&~(C1&C2)). I believe ((C1|C2)&~(C1&C2)) is equivalent to (C1^C2).

Differential Revision: https://reviews.llvm.org/D36505

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@310658 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Transforms/InstCombine/InstCombineAndOrXor.cpp
test/Transforms/InstCombine/or.ll
test/Transforms/InstCombine/select-with-bitwise-ops.ll