commit | ebb0c94e1b56904295b5cf9760d4c9638164f2b8 | [log] [tgz] |
---|---|---|
author | Nuno Lopes <nunoplopes@sapo.pt> | Thu Jun 28 00:59:33 2012 +0000 |
committer | Nuno Lopes <nunoplopes@sapo.pt> | Thu Jun 28 00:59:33 2012 +0000 |
tree | 9e33c6bc5008bb0888fc288472c8d57525ccb531 | |
parent | 5cb50c5bd54b54e3f6ef8d3f7fcaea92bfb08a0f [diff] [blame] |
fix a off-by-one bug in intersectWith(), and add a bunch of tests llvm-svn: 159319
diff --git a/llvm/lib/Support/ConstantRange.cpp b/llvm/lib/Support/ConstantRange.cpp index e7d8483..61d333f 100644 --- a/llvm/lib/Support/ConstantRange.cpp +++ b/llvm/lib/Support/ConstantRange.cpp
@@ -316,7 +316,7 @@ return CR; } - if (CR.Upper.ult(Lower)) { + if (CR.Upper.ule(Lower)) { if (CR.Lower.ult(Lower)) return *this;