[InstCombine] add helper function to foldCastedBitwiseLogic() ; NFCI
authorSanjay Patel <spatel@rotateright.com>
Tue, 23 Feb 2016 16:36:07 +0000 (16:36 +0000)
committerSanjay Patel <spatel@rotateright.com>
Tue, 23 Feb 2016 16:36:07 +0000 (16:36 +0000)
commit40e7ba00467fcd1f15ed8e540d43eb6caf200b22
tree0afae6f866bb8802fd32c09b6420e46a7d9df0c5
parent9fe1e550c8086211372270d9f29cc806c09a4d19
[InstCombine] add helper function to foldCastedBitwiseLogic() ; NFCI

This is a straight cut and paste of the existing code and is intended to
be the first step in solving part of PR26702:
https://llvm.org/bugs/show_bug.cgi?id=26702

We should be able to reuse most of this and delete the nearly identical
existing code in visitOr(). Then, we can enhance visitXor() to use the
same code too.

llvm-svn: 261649
llvm/lib/Transforms/InstCombine/InstCombineAndOrXor.cpp
llvm/lib/Transforms/InstCombine/InstCombineInternal.h