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

Simon Pilgrim via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Sat Jun 6 06:22:53 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,
----------------
We probably should explicitly explain the loBit == hiBit case here and for setBitsWithWrap


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