[Openmp-commits] [openmp] 0a954a5 - [OpenMP][FIX] Repair accidental replacement of _shfl_sync with _shfl

Johannes Doerfert via Openmp-commits openmp-commits at lists.llvm.org
Mon Mar 15 20:46:05 PDT 2021


Author: Johannes Doerfert
Date: 2021-03-15T22:46:00-05:00
New Revision: 0a954a528b8702681118cfb773d651c1860aee36

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

LOG: [OpenMP][FIX] Repair accidental replacement of _shfl_sync with _shfl

This was broken accidentally in D95752.

Reviewed By: ye-luo

Differential Revision: https://reviews.llvm.org/D98677

Added: 
    

Modified: 
    openmp/libomptarget/deviceRTLs/common/include/target/shuffle.h

Removed: 
    


################################################################################
diff  --git a/openmp/libomptarget/deviceRTLs/common/include/target/shuffle.h b/openmp/libomptarget/deviceRTLs/common/include/target/shuffle.h
index e274aa946ebb..5841b1102b32 100644
--- a/openmp/libomptarget/deviceRTLs/common/include/target/shuffle.h
+++ b/openmp/libomptarget/deviceRTLs/common/include/target/shuffle.h
@@ -85,13 +85,13 @@ inline int32_t __kmpc_impl_shfl_down_sync(uint64_t Mask, int32_t Var,
 
 inline int32_t __kmpc_impl_shfl_sync(uint64_t Mask, int32_t Var,
                                      int32_t SrcLane) {
-  return __nvvm_shfl_idx_i32(Var, SrcLane, 0x1f);
+  return __nvvm_shfl_sync_idx_i32(Mask, Var, SrcLane, 0x1f);
 }
 
 inline int32_t __kmpc_impl_shfl_down_sync(uint64_t Mask, int32_t Var,
                                           uint32_t Delta, int32_t Width) {
   int32_t T = ((GetWarpSize() - Width) << 8) | 0x1f;
-  return __nvvm_shfl_down_i32(Var, Delta, T);
+  return __nvvm_shfl_sync_down_i32(Mask, Var, Delta, T);
 }
 
 #pragma omp end declare variant


        


More information about the Openmp-commits mailing list