[PATCH] D151606: [NFC][CLANG] Fix Static Code Analyzer Concerns with bad bit right shift operation in getNVPTXLaneID()

Artem Belevich via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Tue May 30 09:37:25 PDT 2023


tra added a comment.

In practice we're guaranteed by GPU architecture that the warp size will always be small enough to fit in 32 bits.

Also `log2_32` will never return a value larger than 32.

Does this assert help with anything else other than potential undefined behavior?


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

https://reviews.llvm.org/D151606



More information about the cfe-commits mailing list