Author: Joseph Huber
Date: 2025-04-30T16:25:28-05:00
New Revision: 0a1dde1d7957531701ba56e357276033a927f496

URL: 
https://github.com/llvm/llvm-project/commit/0a1dde1d7957531701ba56e357276033a927f496
DIFF: 
https://github.com/llvm/llvm-project/commit/0a1dde1d7957531701ba56e357276033a927f496.diff

LOG: [Clang] Fix GPU match any truncating 64-bit lane mask

Summary:
This is a lane mask, needs all 64 bits for those wave64 targets. At some
point we should introduce __lanemask_t for this.

Added: 
    

Modified: 
    clang/lib/Headers/gpuintrin.h

Removed: 
    


################################################################################
diff  --git a/clang/lib/Headers/gpuintrin.h b/clang/lib/Headers/gpuintrin.h
index 0fb3916acac61..d308cc959be84 100644
--- a/clang/lib/Headers/gpuintrin.h
+++ b/clang/lib/Headers/gpuintrin.h
@@ -261,7 +261,7 @@ __DO_LANE_SUM(double, f64);   // double 
__gpu_lane_sum_f64(m, x)
 // Returns a bitmask marking all lanes that have the same value of __x.
 _DEFAULT_FN_ATTRS static __inline__ uint64_t
 __gpu_match_any_u32_impl(uint64_t __lane_mask, uint32_t __x) {
-  uint32_t __match_mask = 0;
+  uint64_t __match_mask = 0;
 
   bool __done = 0;
   while (__gpu_ballot(__lane_mask, !__done)) {


        
_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to