rdar://12329730 (defect 2)
authorShuxin Yang <shuxin.llvm@gmail.com>
Mon, 26 Nov 2012 21:44:25 +0000 (21:44 +0000)
committerShuxin Yang <shuxin.llvm@gmail.com>
Mon, 26 Nov 2012 21:44:25 +0000 (21:44 +0000)
commitb30e256993e075c838ffa1b7af6b04dd28be2c34
tree91872f135012786c20ce9ccc03aca3c38546b10d
parentec66ac5318f8546fcb002e1f26063144e224f279
rdar://12329730 (defect 2)

Enhancement to InstCombine. Try to catch this opportunity:

 ---------------------------------------------------------------
 ((X^C1) >> C2) ^ C3  => (X>>C2) ^ ((C1>>C2)^C3)
  where the subexpression "X ^ C1" has more than one uses, and
  "(X^C1) >> C2" has single use.
 ----------------------------------------------------------------

 Reviewed by Nadav (with minor change per his request).

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