This is an archive of the discontinued LLVM Phabricator instance.

Instcombine ((A & ~B) ^ (~A & B)) to A ^ B
ClosedPublic

Authored by mayurp on Aug 13 2014, 10:03 PM.

Details

Summary

Hi David,
Another small patch implementing ((A & ~B) ^ (~A & B)) -> A ^ B , similar to previous one, but with And condition.
Please review the patch.

Proof:
$ cat t.cvc
A, B : BITVECTOR(32);
QUERY BVXOR((A & ~B),(~A & B)) = BVXOR(A,B);
$ cvc3 t.cvc
Valid.

Thanks,
Mayur

Diff Detail

Repository
rL LLVM

Event Timeline

mayurp updated this revision to Diff 12485.Aug 13 2014, 10:03 PM
mayurp retitled this revision from to Instcombine ((A & ~B) ^ (~A & B)) to A ^ B.
mayurp updated this object.
mayurp edited the test plan for this revision. (Show Details)
mayurp added a reviewer: majnemer.
mayurp added a subscriber: Unknown Object (MLST).
majnemer accepted this revision.Aug 14 2014, 2:31 AM
majnemer edited edge metadata.

LGTM.

This revision is now accepted and ready to land.Aug 14 2014, 2:31 AM

Hi David,

Can you please commit this on my behalf.

Thanks
Mayur

mayurp closed this revision.Aug 19 2014, 1:28 AM
mayurp updated this revision to Diff 12647.

Closed by commit rL215974 (authored by @mayurp).