[PATCH] D113291: [AggressiveInstCombine] Lower Table Based CTTZ

Craig Topper via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Sat Aug 27 12:11:48 PDT 2022


craig.topper added inline comments.


================
Comment at: llvm/lib/Transforms/AggressiveInstCombine/AggressiveInstCombine.cpp:486
+
+  APInt Mask(InputBits, ((IntWidth << (InputBits - Shift)) - 1) << Shift);
+  unsigned Matched = 0;
----------------
I think this can be
Mask = APInt::getBitsSetFrom(InputBits , Shift)


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

https://reviews.llvm.org/D113291



More information about the llvm-commits mailing list