OSDN Git Service

InstCombine: Combine (xor (or %a, %b) (xor %a, %b)) to (add %a, %b)
authorKarthik Bhat <kv.bhat@samsung.com>
Wed, 13 Aug 2014 05:13:14 +0000 (05:13 +0000)
committerKarthik Bhat <kv.bhat@samsung.com>
Wed, 13 Aug 2014 05:13:14 +0000 (05:13 +0000)
commit7ef167ae1f41c692688fd357e2aa2fa13ad93426
tree8eec82f2b94d7718211990e3b42ad080be949c8d
parent59ee88d574815844b39d630ff1d8afccf2e8ee84
InstCombine: Combine (xor (or %a, %b) (xor %a, %b)) to (add %a, %b)

Correctness proof of the transform using CVC3-

$ cat t.cvc
A, B : BITVECTOR(32);
QUERY BVXOR(A | B, BVXOR(A,B) ) = A & B;

$ cvc3 t.cvc
Valid.

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