[PATCH] D81325: [APInt] set all bits for getBitsSetWithWrap if loBit == hiBit

Simon Pilgrim via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Sun Jun 7 09:01:43 PDT 2020


RKSimon added inline comments.


================
Comment at: llvm/include/llvm/ADT/APInt.h:621
+  /// If \p hiBit is not bigger than \p loBit, the set bits "wrap". For example,
+  /// with parameters (32, 28, 4), you would get 0xF000000F.
   static APInt getBitsSetWithWrap(unsigned numBits, unsigned loBit,
----------------
shchenz wrote:
> RKSimon wrote:
> > We probably should explicitly explain the loBit == hiBit case here and for setBitsWithWrap
> Good idea.
Please update the setBitsWithWrap dox comment as well


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D81325/new/

https://reviews.llvm.org/D81325





More information about the llvm-commits mailing list