[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 e3b43ed..265b6e9 100644
--- a/lib/Support/ConstantRange.cpp
+++ b/lib/Support/ConstantRange.cpp
@@ -447,7 +447,7 @@
   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()) {