OSDN Git Service

[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)
commit86dfeddc700b4d94ca837f2dd35a755542e2acdc
treed97c1593d0ffc9dd0bea615fd171594cf4896b32
parent255ac753d51c4b4a98e417ec7a83f34c4185ab8b
[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.).

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@307400 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Analysis/ValueTracking.cpp
test/Transforms/InstCombine/select-implied.ll