aboutsummaryrefslogtreecommitdiff
path: root/lib/Support/ConstantRange.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'lib/Support/ConstantRange.cpp')
-rw-r--r--lib/Support/ConstantRange.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/Support/ConstantRange.cpp b/lib/Support/ConstantRange.cpp
index 4593eb9dff..e427f820c4 100644
--- a/lib/Support/ConstantRange.cpp
+++ b/lib/Support/ConstantRange.cpp
@@ -618,7 +618,7 @@ ConstantRange::shl(const ConstantRange &Amount) const {
APInt max = getUnsignedMax() << Amount.getUnsignedMax();
// there's no overflow!
- APInt Zeros(sizeof(unsigned)*8, getUnsignedMax().countLeadingZeros());
+ APInt Zeros(getBitWidth(), getUnsignedMax().countLeadingZeros());
if (Zeros.uge(Amount.getUnsignedMax()))
return ConstantRange(min, max);