[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
This commit is contained in:
Nuno Lopes 2013-10-31 19:53:53 +00:00
parent 1d28917dc3
commit 7de1b3bd45

View File

@ -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()) {