diff options
author | Nick Lewycky <nicholas@mxc.ca> | 2010-09-06 23:52:49 +0000 |
---|---|---|
committer | Nick Lewycky <nicholas@mxc.ca> | 2010-09-06 23:52:49 +0000 |
commit | 32cda119ef63ae1f1ee4b60e1d9e4a5ea8e00604 (patch) | |
tree | 092226f89f03ed3f6063bdd508313f56831f403d /include | |
parent | c5cebeb3cb44a3fd0aaee956431159757ee47914 (diff) | |
download | llvm-32cda119ef63ae1f1ee4b60e1d9e4a5ea8e00604.tar.gz llvm-32cda119ef63ae1f1ee4b60e1d9e4a5ea8e00604.tar.bz2 llvm-32cda119ef63ae1f1ee4b60e1d9e4a5ea8e00604.tar.xz |
Add a new isSignWrappedSet() method to ConstantRange.
Fix zeroExtend and signExtend to support empty sets, and to return the smallest
possible result set which contains the extension of each element in their
inputs. For example zext i8 [100, 10) to i16 is now [0, 256), not i16 [100, 10)
which contains 63446 members.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@113187 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include')
-rw-r--r-- | include/llvm/Support/ConstantRange.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/include/llvm/Support/ConstantRange.h b/include/llvm/Support/ConstantRange.h index 29086b2ac4..2af2cf61ea 100644 --- a/include/llvm/Support/ConstantRange.h +++ b/include/llvm/Support/ConstantRange.h @@ -92,6 +92,11 @@ public: /// bool isWrappedSet() const; + /// isSignWrappedSet - Return true if this set wraps around the INT_MIN of + /// its bitwidth, for example: i8 [120, 140). + /// + bool isSignWrappedSet() const; + /// contains - Return true if the specified value is in the set. /// bool contains(const APInt &Val) const; |