InstCombine: Move Sub->Xor rule from SimplifyDemanded to InstCombine
authorMatthias Braun <matze@braunis.de>
Thu, 30 Apr 2015 22:04:26 +0000 (22:04 +0000)
committerMatthias Braun <matze@braunis.de>
Thu, 30 Apr 2015 22:04:26 +0000 (22:04 +0000)
commite233e19ac6fb32408e374dfe677641aaf16f7d65
tree1b48fc908ac262426bf40ee6e370f292d451b0c5
parenta55dd52dc89f93ce88079c9fa32a9625e222e949
InstCombine: Move Sub->Xor rule from SimplifyDemanded to InstCombine

The rule that turns a sub to xor if the LHS is 2^n-1 and the remaining bits
are known zero, does not use the demanded bits at all: Move it to the
normal InstCombine code path.

Differential Revision: http://reviews.llvm.org/D9417

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@236268 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Transforms/InstCombine/InstCombineAddSub.cpp
lib/Transforms/InstCombine/InstCombineSimplifyDemanded.cpp