diff options
author | Nuno Lopes <nunoplopes@sapo.pt> | 2013-10-31 19:53:53 +0000 |
---|---|---|
committer | Nuno Lopes <nunoplopes@sapo.pt> | 2013-10-31 19:53:53 +0000 |
commit | 7de1b3bd458c33949b9b3f7eb1b9e0c07cfdf65a (patch) | |
tree | 9ce788951dd9a6512f54544ee94bb2d59e453af8 | |
parent | 1d28917dc39f38847f5c69c0a60cd1491430bdad (diff) | |
download | external_llvm-7de1b3bd458c33949b9b3f7eb1b9e0c07cfdf65a.zip external_llvm-7de1b3bd458c33949b9b3f7eb1b9e0c07cfdf65a.tar.gz external_llvm-7de1b3bd458c33949b9b3f7eb1b9e0c07cfdf65a.tar.bz2 |
[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
-rw-r--r-- | lib/Support/ConstantRange.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/Support/ConstantRange.cpp b/lib/Support/ConstantRange.cpp index e3b43ed..265b6e9 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()) { |