Add isNegative() and isNonNegative() methods to ConstantRange, which determine whether all values in the constant range are negative/non-negative. The naming follows KnownBits, where these methods have the same meaning. Could also use something like isAllNegative() and isAllNonNegative(), if that's more clear.
Motivation is to replace existing KnownBits calls when switching over computeOverflowForSignedAdd() to use ranges only (https://github.com/llvm-mirror/llvm/blob/master/lib/Analysis/ValueTracking.cpp#L4154).
Hm, i would prefer to do
since it is arguably more obvious.
Not sure it is better though.