[llvm] r193795 - [ConstantRange] improve my previous patch per Nick suggestion
Nuno Lopes
nunoplopes at sapo.pt
Thu Oct 31 12:53:53 PDT 2013
Author: nlopes
Date: Thu Oct 31 14:53:53 2013
New Revision: 193795
URL: http://llvm.org/viewvc/llvm-project?rev=193795&view=rev
Log:
[ConstantRange] improve my previous patch per Nick suggestion
Modified:
llvm/trunk/lib/Support/ConstantRange.cpp
Modified: llvm/trunk/lib/Support/ConstantRange.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Support/ConstantRange.cpp?rev=193795&r1=193794&r2=193795&view=diff
==============================================================================
--- llvm/trunk/lib/Support/ConstantRange.cpp (original)
+++ llvm/trunk/lib/Support/ConstantRange.cpp Thu Oct 31 14:53:53 2013
@@ -447,7 +447,7 @@ ConstantRange ConstantRange::signExtend(
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()) {
More information about the llvm-commits
mailing list