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 | ebb0c94e1b56904295b5cf9760d4c9638164f2b8 (patch) | |
tree | 9e33c6bc5008bb0888fc288472c8d57525ccb531 /llvm/lib/Support | |
parent | 5cb50c5bd54b54e3f6ef8d3f7fcaea92bfb08a0f (diff) | |
download | bcm5719-llvm-ebb0c94e1b56904295b5cf9760d4c9638164f2b8.tar.gz bcm5719-llvm-ebb0c94e1b56904295b5cf9760d4c9638164f2b8.zip |
fix a off-by-one bug in intersectWith(), and add a bunch of tests
llvm-svn: 159319
Diffstat (limited to 'llvm/lib/Support')
-rw-r--r-- | llvm/lib/Support/ConstantRange.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/llvm/lib/Support/ConstantRange.cpp b/llvm/lib/Support/ConstantRange.cpp index e7d84831280..61d333f24a0 100644 --- a/llvm/lib/Support/ConstantRange.cpp +++ b/llvm/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; |