[InstSimplify] Fold simple known implications to true
authorPhilip Reames <listmail@philipreames.com>
Mon, 28 Sep 2015 17:14:24 +0000 (17:14 +0000)
committerPhilip Reames <listmail@philipreames.com>
Mon, 28 Sep 2015 17:14:24 +0000 (17:14 +0000)
commit436ea79c637d874de433ba8c45804adf41732fc0
treea318ba850c3fd79c56a17870ba833d1a4192f559
parent90d2c9d60b0a7eb7e9ba3bc5d4388364aef38dc0
[InstSimplify] Fold simple known implications to true

This was split off of http://reviews.llvm.org/D13040 to make it easier to test the correctness of the implication logic. For the moment, this only handles a single easy case which shows up when eliminating and combining range checks. In the (near) future, I plan to extend this for other cases which show up in range checks, but I wanted to make those changes incrementally once the framework was in place.

At the moment, the implication logic will be used by three places. One in InstSimplify (this review) and two in SimplifyCFG (http://reviews.llvm.org/D13040 & http://reviews.llvm.org/D13070). Can anyone think of other locations this style of reasoning would make sense?

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@248719 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Analysis/InstructionSimplify.cpp
test/Transforms/InstSimplify/implies.ll [new file with mode: 0644]