From 5ab5499a5cc2de2ef4fd813a66438d44ee88e425 Mon Sep 17 00:00:00 2001 From: Anastasia Stulova Date: Mon, 20 Mar 2017 15:02:54 +0000 Subject: [PATCH] [OpenCL] Fix extension guards for atomic functions Review: D30830 Patch by James Price! git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@298256 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/Headers/opencl-c.h | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/lib/Headers/opencl-c.h b/lib/Headers/opencl-c.h index f6ae50c9f0..6452d5c987 100644 --- a/lib/Headers/opencl-c.h +++ b/lib/Headers/opencl-c.h @@ -13703,10 +13703,10 @@ float __ovld atomic_xchg(volatile __local float *p, float val); #if defined(cl_khr_global_int32_base_atomics) int __ovld atom_xchg(volatile __global int *p, int val); -int __ovld atom_xchg(volatile __local int *p, int val); +unsigned int __ovld atom_xchg(volatile __global unsigned int *p, unsigned int val); #endif #if defined(cl_khr_local_int32_base_atomics) -unsigned int __ovld atom_xchg(volatile __global unsigned int *p, unsigned int val); +int __ovld atom_xchg(volatile __local int *p, int val); unsigned int __ovld atom_xchg(volatile __local unsigned int *p, unsigned int val); #endif @@ -13823,8 +13823,6 @@ unsigned int __ovld atom_min(volatile __local unsigned int *p, unsigned int val) #if defined(cl_khr_int64_extended_atomics) long __ovld atom_min(volatile __global long *p, long val); unsigned long __ovld atom_min(volatile __global unsigned long *p, unsigned long val); -#endif -#if defined(cl_khr_local_int32_extended_atomics) long __ovld atom_min(volatile __local long *p, long val); unsigned long __ovld atom_min(volatile __local unsigned long *p, unsigned long val); #endif -- 2.40.0