[InstCombine] enable optimization of casted vector xor instructions
authorSanjay Patel <spatel@rotateright.com>
Wed, 24 Feb 2016 17:00:34 +0000 (17:00 +0000)
committerSanjay Patel <spatel@rotateright.com>
Wed, 24 Feb 2016 17:00:34 +0000 (17:00 +0000)
commitdbbaca0e1b5d9a6e36ffdf523c946f02fd6c2357
tree741a19906b698d01bdee771f340c914e79e556ea
parentb508f520e7711873e002d0679af2988c6e62f431
[InstCombine] enable optimization of casted vector xor instructions

This is part of the payoff for the refactoring in:
http://reviews.llvm.org/rL261649
http://reviews.llvm.org/rL261707

In addition to removing a pile of duplicated code, the xor case was
missing the optimization for vector types because it checked
"SrcTy->isIntegerTy()" rather than "SrcTy->isIntOrIntVectorTy()"
like 'and' and 'or' were already doing.

This solves part of:
https://llvm.org/bugs/show_bug.cgi?id=26702

llvm-svn: 261750
llvm/lib/Transforms/InstCombine/InstCombineAndOrXor.cpp
llvm/test/Transforms/InstCombine/bitcast.ll