[ConstantRange] improve my previous patch per Nick suggestion

llvm-svn: 193795
diff --git a/llvm/lib/Support/ConstantRange.cpp b/llvm/lib/Support/ConstantRange.cpp
index e3b43ed..265b6e9 100644
--- a/llvm/lib/Support/ConstantRange.cpp
+++ b/llvm/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()) {