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) {
121
121
uint32_t __hi = (uint32_t )(__x >> 32ull );
122
122
uint32_t __lo = (uint32_t )(__x & 0xFFFFFFFF );
123
123
return ((uint64_t )__builtin_amdgcn_readfirstlane (__hi ) << 32ull ) |
124
- ((uint64_t )__builtin_amdgcn_readfirstlane (__lo ));
124
+ ((uint64_t )__builtin_amdgcn_readfirstlane (__lo ) & 0xFFFFFFFF );
125
125
}
126
126
127
127
// 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) {
131
131
__gpu_num_lanes () - 1 )
132
132
<< 32ull ) |
133
133
((uint64_t )__nvvm_shfl_sync_idx_i32 (__mask , __lo , __id ,
134
- __gpu_num_lanes () - 1 ));
134
+ __gpu_num_lanes () - 1 ) &
135
+ 0xFFFFFFFF );
135
136
}
136
137
137
138
// 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