aboutsummaryrefslogtreecommitdiff
path: root/include/llvm/Support/ConstantRange.h
diff options
context:
space:
mode:
authorNuno Lopes <nunoplopes@sapo.pt>2009-11-12 14:53:53 +0000
committerNuno Lopes <nunoplopes@sapo.pt>2009-11-12 14:53:53 +0000
commit34e992da381bf8b1a9cbcc1bde0b117207809649 (patch)
treebfc6711fceabd3619aa75a783f1e54a598aacceb /include/llvm/Support/ConstantRange.h
parent9e3728be625503e7145fa7c94735bd1878be9038 (diff)
implement shl, ashr, and lshr methods. shl is not fully implemented as it is quite tricky.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@86986 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/llvm/Support/ConstantRange.h')
-rw-r--r--include/llvm/Support/ConstantRange.h12
1 files changed, 12 insertions, 0 deletions
diff --git a/include/llvm/Support/ConstantRange.h b/include/llvm/Support/ConstantRange.h
index 438ec143e8..6342c6f1bd 100644
--- a/include/llvm/Support/ConstantRange.h
+++ b/include/llvm/Support/ConstantRange.h
@@ -217,6 +217,18 @@ public:
/// TODO: This isn't fully implemented yet.
ConstantRange udiv(const ConstantRange &Other) const;
+ /// shl - Return a new range representing the possible values resulting
+ /// from a left shift of a value in this range by the Amount value.
+ ConstantRange shl(const ConstantRange &Amount) const;
+
+ /// ashr - Return a new range representing the possible values resulting from
+ /// an arithmetic right shift of a value in this range by the Amount value.
+ ConstantRange ashr(const ConstantRange &Amount) const;
+
+ /// shr - Return a new range representing the possible values resulting
+ /// from a logical right shift of a value in this range by the Amount value.
+ ConstantRange lshr(const ConstantRange &Amount) const;
+
/// print - Print out the bounds to a stream...
///
void print(raw_ostream &OS) const;