[PATCH] D113291: [AggressiveInstCombine] Lower Table Based CTTZ
Djordje Todorovic via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Sat Aug 27 06:31:47 PDT 2022
djtodoro marked 4 inline comments as done.
djtodoro added inline comments.
================
Comment at: llvm/lib/Transforms/AggressiveInstCombine/AggressiveInstCombine.cpp:476-477
+static bool isCTTZTable(const ConstantDataArray &Table, uint64_t Mul,
+ uint64_t Shift, uint64_t InputBits) {
+ unsigned Length = Table.getNumElements();
----------------
spatel wrote:
> There was a request to put a comment on this function, and I'll second that request. It's not clear why we are counting matches rather than just bailing out on the first mismatch. I think that's because you can construct/recognize a table with unaccessed/undefined elements?
Yes, that is the reason - we are iterating over the elements of the table, so there could be mismatch that we can ignore. A comment is coming.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D113291/new/
https://reviews.llvm.org/D113291
More information about the llvm-commits
mailing list