[InstCombine] allow more narrowing transforms for logic ops
authorSanjay Patel <spatel@rotateright.com>
Wed, 30 Nov 2016 20:48:54 +0000 (20:48 +0000)
committerSanjay Patel <spatel@rotateright.com>
Wed, 30 Nov 2016 20:48:54 +0000 (20:48 +0000)
commitaa8b28e50901045476faca1b1047123d4f43d7ce
tree76a73c3c4358c1d19f5187843059e474286bf549
parentf00e2c09bea89c73aa6501ff5430586d35372fca
[InstCombine] allow more narrowing transforms for logic ops

We had a limited version of this for scalar 'and'; this expands
the transform to 'or' and 'xor' and allows vectors types too.

llvm-svn: 288273
llvm/lib/Transforms/InstCombine/InstCombineCasts.cpp
llvm/lib/Transforms/InstCombine/InstCombineInternal.h
llvm/test/Transforms/InstCombine/narrow.ll