[JumpThreading] Use dominating conditions to prove implications
authorSanjoy Das <sanjoy@playingwithpointers.com>
Wed, 28 Oct 2015 21:27:08 +0000 (21:27 +0000)
committerSanjoy Das <sanjoy@playingwithpointers.com>
Wed, 28 Oct 2015 21:27:08 +0000 (21:27 +0000)
commitee37e50003d1bebb189c694b7f88c377a29e242e
treeeb9242f9768d51394b1f07b2baa9d2fd81af4a19
parent79dc87fc1ed4270dcc72bf12aeb5aae9b9163041
[JumpThreading] Use dominating conditions to prove implications

Summary:
If P branches to Q conditional on C and Q branches to R conditional on
C' and C => C' then the branch conditional on C' can be folded to an
unconditional branch.

Reviewers: reames

Subscribers: llvm-commits

Differential Revision: http://reviews.llvm.org/D13972

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@251557 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Transforms/Scalar/JumpThreading.cpp
test/Transforms/JumpThreading/implied-cond.ll [new file with mode: 0644]