This patch fixes behaviour of APInt::getBitsNeeded for INT_MIN 10 bits values.
Details
Details
Diff Detail
Diff Detail
- Repository
- rL LLVM
- Build Status
Buildable 33758 Build 33757: arc lint + arc unit
Event Timeline
lib/Support/APInt.cpp | ||
---|---|---|
488 | this seems inefficient? we're calling logbase2 and exactlogbase2? Perhaps just call isPowerOf2() directly since exactlogbase2 is int32_t exactLogBase2() const { if (!isPowerOf2()) return -1; return logBase2(); } ? Just a suggestion |
unittests/ADT/APIntTest.cpp | ||
---|---|---|
1269 | Please can you add a few other INT_MIN cases - regular and irregular sizes (e.g. i1, i23, i32, i64) |
this seems inefficient? we're calling logbase2 and exactlogbase2? Perhaps just call isPowerOf2() directly since exactlogbase2 is
int32_t exactLogBase2() const {
?
Just a suggestion