InstCombine: Fold ((A | B) & C1) ^ (B & C2) -> (A & C1) ^ B if C1^C2=-1
authorDavid Majnemer <david.majnemer@gmail.com>
Thu, 21 Aug 2014 05:14:48 +0000 (05:14 +0000)
committerDavid Majnemer <david.majnemer@gmail.com>
Thu, 21 Aug 2014 05:14:48 +0000 (05:14 +0000)
commite234f93b3e24be1874e97eef4e47480706c7dbed
tree58b7dd8f99bdc00a70a4069f7abe2cc30781f603
parente88b79628563d1c6a6e85e87c542e715c11dd173
InstCombine: Fold ((A | B) & C1) ^ (B & C2) -> (A & C1) ^ B if C1^C2=-1

Adapted from a patch by Richard Smith, test-case written by me.

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