InstSimplify: Restore optimizations lost in r210006
authorDavid Majnemer <david.majnemer@gmail.com>
Thu, 27 Nov 2014 06:32:46 +0000 (06:32 +0000)
committerDavid Majnemer <david.majnemer@gmail.com>
Thu, 27 Nov 2014 06:32:46 +0000 (06:32 +0000)
commitc6a5e1dd4f595b2ff437ee47345b9c27864ad232
tree47ed58586fe32b5e92445a363a94bcca4f8e98ab
parenta5cd950c731c803e1a65159e53bbdad0ca255bef
InstSimplify: Restore optimizations lost in r210006

This restores our ability to optimize:
(X & C) ? X & ~C : X  into  X & ~C
(X & C) ? X : X & ~C  into  X
(X & C) ? X | C : X  into  X
(X & C) ? X : X | C  into  X | C

llvm-svn: 222868
llvm/lib/Analysis/InstructionSimplify.cpp
llvm/test/Transforms/InstCombine/select.ll
llvm/test/Transforms/InstSimplify/select.ll [new file with mode: 0644]