[libc-commits] [PATCH] D157548: [libc] Silence integer shortening warnings on NVPTX masks

Joseph Huber via Phabricator via libc-commits libc-commits at lists.llvm.org
Wed Aug 9 15:17:53 PDT 2023


jhuber6 added inline comments.


================
Comment at: libc/src/__support/GPU/nvptx/utils.h:119
+  uint32_t lane_mask = static_cast<uint32_t>(get_lane_mask());
+  uint32_t id = __builtin_ffs(lane_mask) - 1;
 #if __CUDA_ARCH__ >= 600
----------------
sivachandra wrote:
> May be cast the return value of this builtin also?
This should return a 32-bit value on the target.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D157548



More information about the libc-commits mailing list