aboutsummaryrefslogtreecommitdiff
path: root/llvm/unittests/IR/ConstantRangeTest.cpp
AgeCommit message (Collapse)AuthorFilesLines
2016-03-03[ConstantRange] Rename test; NFCSanjoy Das1-1/+1
llvm-svn: 262640
2016-03-03[ConstantRange] Generalize makeGuaranteedNoWrapRegion to work on rangesSanjoy Das1-0/+57
This will be used in a later patch to ScalarEvolution. Right now only the unit tests exercise the newly added code. llvm-svn: 262637
2016-02-26[ConstantRange] Add umin/smin operatorsPhilip Reames1-0/+39
This was split off from http://reviews.llvm.org/D17184. Reviewed by: Sanjoy llvm-svn: 262080
2016-02-22[ConstantRange] Rename a method and add more docSanjoy Das1-5/+5
Rename makeNoWrapRegion to a more obvious makeGuaranteedNoWrapRegion, and add a comment about the counter-intuitive aspects of the function. This is to help prevent cases like PR26628. llvm-svn: 261532
2015-10-22[IR] Add a `makeNoWrapRegion` method to `ConstantRange`Sanjoy Das1-0/+52
Summary: This will be used in a future change to ScalarEvolution. Reviewers: hfinkel, reames, nlewycky Subscribers: llvm-commits Differential Revision: http://reviews.llvm.org/D13612 llvm-svn: 250975
2015-03-18[ConstantRange] Split makeICmpRegion in two.Sanjoy Das1-3/+55
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 llvm-svn: 232575
2015-03-06[ConstantRange] Teach multiply to be cleverer about signed ranges.James Molloy1-0/+7
Multiplication is not dependent on signedness, so just treating all input ranges as unsigned is not incorrect. However it will cause overly pessimistic ranges (such as full-set) when used with signed negative values. Teach multiply to try to interpret its inputs as both signed and unsigned, and then to take the most specific (smallest population) as its result. llvm-svn: 231483
2014-06-08[C++11] Use 'nullptr'.Craig Topper1-4/+4
llvm-svn: 210442
2014-03-04[Modules] Move the ConstantRange class into the IR library. This isChandler Carruth1-0/+512
a bit surprising, as the class is almost entirely abstracted away from any particular IR, however it encodes the comparsion predicates which mutate ranges as ICmp predicate codes. This is reasonable as they're used for both instructions and constants. Thus, it belongs in the IR library with instructions and constants. llvm-svn: 202838