summaryrefslogtreecommitdiff
path: root/lib/Support/ConstantRange.cpp
diff options
context:
space:
mode:
authorNuno Lopes <nunoplopes@sapo.pt>2013-10-31 19:53:53 +0000
committerNuno Lopes <nunoplopes@sapo.pt>2013-10-31 19:53:53 +0000
commit7de1b3bd458c33949b9b3f7eb1b9e0c07cfdf65a (patch)
tree9ce788951dd9a6512f54544ee94bb2d59e453af8 /lib/Support/ConstantRange.cpp
parent1d28917dc39f38847f5c69c0a60cd1491430bdad (diff)
downloadllvm-7de1b3bd458c33949b9b3f7eb1b9e0c07cfdf65a.tar.gz
llvm-7de1b3bd458c33949b9b3f7eb1b9e0c07cfdf65a.tar.bz2
llvm-7de1b3bd458c33949b9b3f7eb1b9e0c07cfdf65a.tar.xz
[ConstantRange] improve my previous patch per Nick suggestion
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@193795 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Support/ConstantRange.cpp')
-rw-r--r--lib/Support/ConstantRange.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/Support/ConstantRange.cpp b/lib/Support/ConstantRange.cpp
index e3b43ed6df..265b6e96a7 100644
--- a/lib/Support/ConstantRange.cpp
+++ b/lib/Support/ConstantRange.cpp
@@ -447,7 +447,7 @@ ConstantRange ConstantRange::signExtend(uint32_t DstTySize) const {
assert(SrcTySize < DstTySize && "Not a value extension");
// special case: [X, INT_MIN) -- not really wrapping around
- if (Upper == APInt::getHighBitsSet(SrcTySize, 1))
+ if (Upper.isMinSignedValue())
return ConstantRange(Lower.sext(DstTySize), Upper.zext(DstTySize));
if (isFullSet() || isSignWrappedSet()) {