Skip to content
This repository has been archived by the owner on May 14, 2024. It is now read-only.

Commit

Permalink
Update wrapper function for atomic add intrinsic.
Browse files Browse the repository at this point in the history
Until recently the atomic-fadd-no-rtn-insts attribute was needed to bypass feature checks when compiling device library code. Now that we have v_illegal the compiler can handle this case (https://reviews.llvm.org/D123693). However, the code that lowers to either global_atomic_fadd or v_illegal (SIISelLowering.cpp:7825) must rely on atomic-fadd-no-rtn-insts to determine if the target supports it or not (https://reviews.llvm.org/differential/changeset/?ref=3507251).

Change-Id: I99fa0a669abcc9c1c1738d1a4c694455b7bee856
(cherry picked from commit 5bc72d0)
  • Loading branch information
Leon Clark authored and ronlieb committed Aug 19, 2022
1 parent b0bd2f8 commit cc06f70
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion ockl/src/gaaf.cl
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@

extern float __llvm_amdgcn_global_atomic_fadd_f32_p1f32_f32(__global float *, float) __asm("llvm.amdgcn.global.atomic.fadd.f32.p1f32.f32");

__attribute__((target("atomic-fadd-no-rtn-insts"))) static void
static void
global_atomic_fadd(__global float *p, float v)
{
__llvm_amdgcn_global_atomic_fadd_f32_p1f32_f32(p, v);
Expand Down

0 comments on commit cc06f70

Please sign in to comment.