From: Nuno Lopes Date: Thu, 31 Oct 2013 19:53:53 +0000 (+0000) Subject: [ConstantRange] improve my previous patch per Nick suggestion X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=7de1b3bd458c33949b9b3f7eb1b9e0c07cfdf65a;p=oota-llvm.git [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 --- diff --git a/lib/Support/ConstantRange.cpp b/lib/Support/ConstantRange.cpp index e3b43ed6df6..265b6e96a74 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()) {