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

ChenZheng via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Sun Jun 7 09:34:32 PDT 2020


shchenz marked an inline comment as done.
shchenz 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,
----------------
RKSimon wrote:
> 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
Thanks. Updated accordingly.


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