diff options
author | Dan Gohman <gohman@apple.com> | 2009-07-20 22:34:18 +0000 |
---|---|---|
committer | Dan Gohman <gohman@apple.com> | 2009-07-20 22:34:18 +0000 |
commit | 0762051d1dcf3bc5da0a5485942a5342b7c3eea8 (patch) | |
tree | 89bbb0bb29465517e23892e6e6067f8297f93c57 /lib/Analysis/ScalarEvolution.cpp | |
parent | 523f3bca906b4cf0674f223adfa0eccd82ccdd8e (diff) | |
download | external_llvm-0762051d1dcf3bc5da0a5485942a5342b7c3eea8.zip external_llvm-0762051d1dcf3bc5da0a5485942a5342b7c3eea8.tar.gz external_llvm-0762051d1dcf3bc5da0a5485942a5342b7c3eea8.tar.bz2 |
The upper argument of ConstantRange is exclusive, not inclusive.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@76492 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Analysis/ScalarEvolution.cpp')
-rw-r--r-- | lib/Analysis/ScalarEvolution.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/Analysis/ScalarEvolution.cpp b/lib/Analysis/ScalarEvolution.cpp index aadba9d..c888a7a 100644 --- a/lib/Analysis/ScalarEvolution.cpp +++ b/lib/Analysis/ScalarEvolution.cpp @@ -2644,7 +2644,9 @@ ScalarEvolution::getUnsignedRange(const SCEV *S) { APInt Mask = APInt::getAllOnesValue(BitWidth); APInt Zeros(BitWidth, 0), Ones(BitWidth, 0); ComputeMaskedBits(U->getValue(), Mask, Zeros, Ones, TD); - return ConstantRange(Ones, ~Zeros); + if (Ones == ~Zeros + 1) + return FullSet; + return ConstantRange(Ones, ~Zeros + 1); } return FullSet; |