[PATCH] D109555: [APInt] Enable APInt to support zero bit integers.
Dávid Bolvanský via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Sep 10 10:44:39 PDT 2021
xbolva00 added inline comments.
================
Comment at: llvm/include/llvm/ADT/APInt.h:351
+ if (isSingleWord()) {
+ if (BitWidth == 0)
+ return false;
----------------
LLVM_UNLIKELY?
================
Comment at: llvm/include/llvm/ADT/APInt.h:1494
+ if (isSingleWord()) {
+ if (BitWidth == 0)
+ return 0;
----------------
detto
================
Comment at: llvm/include/llvm/ADT/APInt.h:1844
uint64_t mask = WORDTYPE_MAX >> (APINT_BITS_PER_WORD - WordBits);
+ if (BitWidth == 0)
+ mask = 0;
----------------
.
================
Comment at: llvm/lib/Support/APInt.cpp:1067
static unsigned rotateModulo(unsigned BitWidth, const APInt &rotateAmt) {
+ if (BitWidth == 0)
+ return 0;
----------------
.
================
Comment at: llvm/lib/Support/APInt.cpp:1085
APInt APInt::rotl(unsigned rotateAmt) const {
+ if (BitWidth == 0)
+ return *this;
----------------
also here and below..
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D109555/new/
https://reviews.llvm.org/D109555
More information about the llvm-commits
mailing list