[ValueTracking] Improve isImpliedCondition for conditions with matching operands.
authorChad Rosier <mcrosier@codeaurora.org>
Tue, 19 Apr 2016 17:19:14 +0000 (17:19 +0000)
committerChad Rosier <mcrosier@codeaurora.org>
Tue, 19 Apr 2016 17:19:14 +0000 (17:19 +0000)
commitb7dfbb40a3fd9491c0188eca0ed2af66fa5ef44f
tree16244dfe2289ef44c3491a20a63af0f9516cfaa5
parent79e096dbaf974a775e72181d748c4e7c3e659047
[ValueTracking] Improve isImpliedCondition for conditions with matching operands.

This patch improves SimplifyCFG to catch cases like:

  if (a < b) {
    if (a > b) <- known to be false
      unreachable;
  }

Phabricator Revision: http://reviews.llvm.org/D18905

llvm-svn: 266767
llvm/include/llvm/Analysis/ValueTracking.h
llvm/lib/Analysis/InstructionSimplify.cpp
llvm/lib/Analysis/ValueTracking.cpp
llvm/lib/Transforms/Scalar/JumpThreading.cpp
llvm/lib/Transforms/Utils/SimplifyCFG.cpp
llvm/test/Transforms/JumpThreading/implied-cond.ll
llvm/test/Transforms/SimplifyCFG/implied-cond-matching.ll [new file with mode: 0644]