diff --git a/openmp/device/include/Synchronization.h b/openmp/device/include/Synchronization.h index acf42274a066..f164a55e46a1 100644 --- a/openmp/device/include/Synchronization.h +++ b/openmp/device/include/Synchronization.h @@ -42,20 +42,7 @@ enum MemScopeTy { template > V inc(Ty *Address, V Val, atomic::OrderingTy Ordering, MemScopeTy MemScope = MemScopeTy::device) { -#if defined(__SPIRV__) - uint32_t Old; - while (true) { - Old = load(Address, Ordering, MemScope); - if (Old >= Val) { - if (cas(Address, Old, 0u, Ordering, Ordering, MemScope)) - break; - } else if (cas(Address, Old, Old + 1, Ordering, Ordering, MemScope)) - break; - } - return Old; -#else return __scoped_atomic_fetch_uinc(Address, Val, Ordering, MemScope); -#endif } template >