diff options
author | Nuno Lopes <nunoplopes@sapo.pt> | 2012-05-18 00:14:36 +0000 |
---|---|---|
committer | Nuno Lopes <nunoplopes@sapo.pt> | 2012-05-18 00:14:36 +0000 |
commit | 63afc08ca7c8a511d4dcf5c288b4204427cc4e1f (patch) | |
tree | 2787faa0309a2bc0c70d9a4bb889e893b64de086 /llvm/lib | |
parent | badd100c260da2cb4ec6f82e1c68c7e203082511 (diff) | |
download | bcm5719-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.cpp | 2 |
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())) |