summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Support
diff options
context:
space:
mode:
authorNuno Lopes <nunoplopes@sapo.pt>2013-10-31 19:53:53 +0000
committerNuno Lopes <nunoplopes@sapo.pt>2013-10-31 19:53:53 +0000
commit14d4b0cdb212fdca2f910582a001e4bb941fe9e5 (patch)
treeed0c085cfba897c7ff5f06fa75102f3387880589 /llvm/lib/Support
parent1c09d4a537cd7bab63b96acbbc1a27bd33ff2cfc (diff)
downloadbcm5719-llvm-14d4b0cdb212fdca2f910582a001e4bb941fe9e5.tar.gz
bcm5719-llvm-14d4b0cdb212fdca2f910582a001e4bb941fe9e5.zip
[ConstantRange] improve my previous patch per Nick suggestion
llvm-svn: 193795
Diffstat (limited to 'llvm/lib/Support')
-rw-r--r--llvm/lib/Support/ConstantRange.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/llvm/lib/Support/ConstantRange.cpp b/llvm/lib/Support/ConstantRange.cpp
index e3b43ed6df6..265b6e96a74 100644
--- a/llvm/lib/Support/ConstantRange.cpp
+++ b/llvm/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()) {
OpenPOWER on IntegriCloud