summaryrefslogtreecommitdiffstats
path: root/llvm/lib
diff options
context:
space:
mode:
authorNuno Lopes <nunoplopes@sapo.pt>2012-05-18 00:14:36 +0000
committerNuno Lopes <nunoplopes@sapo.pt>2012-05-18 00:14:36 +0000
commit63afc08ca7c8a511d4dcf5c288b4204427cc4e1f (patch)
tree2787faa0309a2bc0c70d9a4bb889e893b64de086 /llvm/lib
parentbadd100c260da2cb4ec6f82e1c68c7e203082511 (diff)
downloadbcm5719-llvm-63afc08ca7c8a511d4dcf5c288b4204427cc4e1f.tar.gz
bcm5719-llvm-63afc08ca7c8a511d4dcf5c288b4204427cc4e1f.zip
fix corner case in ConstantRange::intersectWith().
this fixes the missed optimization I was seeing in the CorrelatedValuePropagation pass llvm-svn: 157032
Diffstat (limited to 'llvm/lib')
-rw-r--r--llvm/lib/Support/ConstantRange.cpp2
1 files changed, 1 insertions, 1 deletions
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()))
OpenPOWER on IntegriCloud