brintos

brintos / llvm-project-archived public Read only

0
0
Text · 438 B · 6f1484c Raw
13 lines · plain
1// RUN: %clang_cc1 -triple amdgcn-amd-amdhsa -target-cpu gfx90a -x hip \2// RUN:  -aux-triple x86_64-unknown-linux-gnu -fcuda-is-device %s \3// RUN:  -fsyntax-only -verify4// expected-no-diagnostics5 6#define __device__ __attribute__((device))7typedef __attribute__((address_space(3))) float *LP;8 9__device__ void test_ds_atomic_add_f32(float *addr, float val) {10  float *rtn;11  *rtn = __builtin_amdgcn_ds_faddf((LP)addr, val, 0, 0, 0);12}13