diff options
author | Nuno Lopes <nunoplopes@sapo.pt> | 2012-06-28 00:59:33 +0000 |
---|---|---|
committer | Nuno Lopes <nunoplopes@sapo.pt> | 2012-06-28 00:59:33 +0000 |
commit | 532516a87bc57f21e6d99f49548e4c2adf835551 (patch) | |
tree | eb4dd8852caf33c4c01be6f44c463e6c4adbf7d3 /lib/Support | |
parent | 58a6cf2c620ce4c127b926408d78aa607a373251 (diff) | |
download | external_llvm-532516a87bc57f21e6d99f49548e4c2adf835551.zip external_llvm-532516a87bc57f21e6d99f49548e4c2adf835551.tar.gz external_llvm-532516a87bc57f21e6d99f49548e4c2adf835551.tar.bz2 |
fix a off-by-one bug in intersectWith(), and add a bunch of tests
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@159319 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Support')
-rw-r--r-- | lib/Support/ConstantRange.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/Support/ConstantRange.cpp b/lib/Support/ConstantRange.cpp index e7d8483..61d333f 100644 --- a/lib/Support/ConstantRange.cpp +++ b/lib/Support/ConstantRange.cpp @@ -316,7 +316,7 @@ ConstantRange ConstantRange::intersectWith(const ConstantRange &CR) const { return CR; } - if (CR.Upper.ult(Lower)) { + if (CR.Upper.ule(Lower)) { if (CR.Lower.ult(Lower)) return *this; |