[ConstantRange] Split makeICmpRegion in two.
authorSanjoy Das <sanjoy@playingwithpointers.com>
Wed, 18 Mar 2015 00:41:24 +0000 (00:41 +0000)
committerSanjoy Das <sanjoy@playingwithpointers.com>
Wed, 18 Mar 2015 00:41:24 +0000 (00:41 +0000)
commitda5f3a3ca5bc534592535d02b2289845461f33db
tree20c83ae2e15bcecb859823b5a8916aafc0fd52a4
parent8f01b96d93b557de0c860be4f5512bde3c31ed64
[ConstantRange] Split makeICmpRegion in two.

Summary:
This change splits `makeICmpRegion` into `makeAllowedICmpRegion` and
`makeSatisfyingICmpRegion` with slightly different contracts.  The first
one is useful for determining what values some expression //may// take,
given that a certain `icmp` evaluates to true.  The second one is useful
for determining what values are guaranteed to //satisfy// a given
`icmp`.

Reviewers: nlewycky

Reviewed By: nlewycky

Subscribers: llvm-commits

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@232575 91177308-0d34-0410-b5e6-96231b3b80d8
include/llvm/IR/ConstantRange.h
lib/Analysis/LazyValueInfo.cpp
lib/IR/ConstantRange.cpp
lib/Transforms/InstCombine/InstCombineAndOrXor.cpp
lib/Transforms/Utils/SimplifyCFG.cpp
unittests/IR/ConstantRangeTest.cpp