File tree Expand file tree Collapse file tree 2 files changed +3
-2
lines changed Expand file tree Collapse file tree 2 files changed +3
-2
lines changed Original file line number Diff line number Diff line change @@ -121,7 +121,7 @@ __gpu_read_first_lane_u64(uint64_t __lane_mask, uint64_t __x) {
121121 uint32_t __hi = (uint32_t )(__x >> 32ull );
122122 uint32_t __lo = (uint32_t )(__x & 0xFFFFFFFF );
123123 return ((uint64_t )__builtin_amdgcn_readfirstlane (__hi ) << 32ull ) |
124- ((uint64_t )__builtin_amdgcn_readfirstlane (__lo ));
124+ ((uint64_t )__builtin_amdgcn_readfirstlane (__lo ) & 0xFFFFFFFF );
125125}
126126
127127// Returns a bitmask of threads in the current lane for which \p x is true.
Original file line number Diff line number Diff line change @@ -131,7 +131,8 @@ __gpu_read_first_lane_u64(uint64_t __lane_mask, uint64_t __x) {
131131 __gpu_num_lanes () - 1 )
132132 << 32ull ) |
133133 ((uint64_t )__nvvm_shfl_sync_idx_i32 (__mask , __lo , __id ,
134- __gpu_num_lanes () - 1 ));
134+ __gpu_num_lanes () - 1 ) &
135+ 0xFFFFFFFF );
135136}
136137
137138// Returns a bitmask of threads in the current lane for which \p x is true.
You can’t perform that action at this time.
0 commit comments