fix corner case in ConstantRange::intersectWith().

this fixes the missed optimization I was seeing in the CorrelatedValuePropagation pass

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@157032 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Nuno Lopes
2012-05-18 00:14:36 +00:00
parent 59c15e920c
commit fbb7a73631
2 changed files with 6 additions and 1 deletions

View File

@ -288,7 +288,7 @@ ConstantRange ConstantRange::intersectWith(const ConstantRange &CR) const {
if (CR.Upper.ult(Upper))
return CR;
if (CR.Upper.ult(Lower))
if (CR.Upper.ule(Lower))
return ConstantRange(CR.Lower, Upper);
if (getSetSize().ult(CR.getSetSize()))