[ValueTracking] Fix the identity case (LHS => RHS) when the LHS is false.
authorChad Rosier <mcrosier@codeaurora.org>
Fri, 7 Jul 2017 13:55:55 +0000 (13:55 +0000)
committerChad Rosier <mcrosier@codeaurora.org>
Fri, 7 Jul 2017 13:55:55 +0000 (13:55 +0000)
commit3f02123f7c3c4c33812ba7a1e6402c33dc0fd0d9
tree8f8b172565933c222f26f7a8acb3e35cb6ad0a83
parent78b0f075f711bb16a261d9972b3154b3072e54d9
[ValueTracking] Fix the identity case (LHS => RHS) when the LHS is false.

Prior to this commit both of the added test cases were passing.  However, in the
latter case (test7) we were doing a lot more work to arrive at the same answer
(i.e., we were using isImpliedCondMatchingOperands() to determine the
implication.).

llvm-svn: 307400
llvm/lib/Analysis/ValueTracking.cpp
llvm/test/Transforms/InstCombine/select-implied.ll