Fold (iszero(A&K1) | iszero(A&K2)) -> (A&(K1|K2)) != (K1|K2) if we know that K1...
authorNadav Rotem <nrotem@apple.com>
Tue, 12 Nov 2013 22:38:59 +0000 (22:38 +0000)
committerNadav Rotem <nrotem@apple.com>
Tue, 12 Nov 2013 22:38:59 +0000 (22:38 +0000)
commit6c84f7ad2dbba5d1afa26a4929c3b032ae9e7e10
tree7d014584e4436f13397de5d2f2b5a252776fd5e5
parentf3bd3ea3fe1abf414d3a38a684f3df7382a1a8d5
Fold (iszero(A&K1) | iszero(A&K2)) ->  (A&(K1|K2)) != (K1|K2) if we know that K1 and K2 are 'one-hot' (only one bit is on).

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