From 63afc08ca7c8a511d4dcf5c288b4204427cc4e1f Mon Sep 17 00:00:00 2001 From: Nuno Lopes Date: Fri, 18 May 2012 00:14:36 +0000 Subject: fix corner case in ConstantRange::intersectWith(). this fixes the missed optimization I was seeing in the CorrelatedValuePropagation pass llvm-svn: 157032 --- llvm/lib/Support/ConstantRange.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'llvm/lib/Support/ConstantRange.cpp') diff --git a/llvm/lib/Support/ConstantRange.cpp b/llvm/lib/Support/ConstantRange.cpp index 5206cf1f9b8..e7d84831280 100644 --- a/llvm/lib/Support/ConstantRange.cpp +++ b/llvm/lib/Support/ConstantRange.cpp @@ -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())) -- cgit v1.2.3