This patch fixes behaviour of APInt::getBitsNeeded for INT_MIN 10 bits values.
Details
Details
Diff Detail
Diff Detail
- Repository
- rL LLVM
Event Timeline
| lib/Support/APInt.cpp | ||
|---|---|---|
| 488 ↗ | (On Diff #206134) | 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 ↗ | (On Diff #206134) | Please can you add a few other INT_MIN cases - regular and irregular sizes (e.g. i1, i23, i32, i64) |