[llvm-commits] [llvm] r86987 - /llvm/trunk/lib/Support/ConstantRange.cpp
Nuno Lopes
nunoplopes at sapo.pt
Thu Nov 12 07:10:33 PST 2009
Author: nlopes
Date: Thu Nov 12 09:10:33 2009
New Revision: 86987
URL: http://llvm.org/viewvc/llvm-project?rev=86987&view=rev
Log:
fix crash in my previous patch
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=86987&r1=86986&r2=86987&view=diff
==============================================================================
--- llvm/trunk/lib/Support/ConstantRange.cpp (original)
+++ llvm/trunk/lib/Support/ConstantRange.cpp Thu Nov 12 09:10:33 2009
@@ -618,7 +618,7 @@
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);
More information about the llvm-commits
mailing list