[ConstantRange] improve my previous patch per Nick suggestion

llvm-svn: 193795
This commit is contained in:
Nuno Lopes 2013-10-31 19:53:53 +00:00
parent 1c09d4a537
commit 14d4b0cdb2
1 changed files with 1 additions and 1 deletions

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