Skip to content

Commit f15e86b

Browse files
authored
[SYCL] Update checks in unsafe atomics test for AMDGPU (#16342)
The need for updated check was caused by a move from using AMD builtins in favour of IR instructions with correct metadata attached, see: b5e63cc I travelled back in time to: * intel/llvm: 358b777 * unified-runtime: oneapi-src/unified-runtime@6406879 and verified that generated assembly (cpp -> IR -> s) is the same for before and after the builtin change.
1 parent 345b054 commit f15e86b

File tree

1 file changed

+3
-6
lines changed

1 file changed

+3
-6
lines changed

sycl/test/check_device_code/hip/atomic/amdgpu_unsafe_atomics.cpp

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
// REQUIRES: hip
2-
// XFAIL: hip
32
// RUN: %clangxx -fsycl -fsycl-targets=amd_gpu_gfx906 %s -S -emit-llvm -o - | FileCheck %s --check-prefixes=CHECK,CHECK-SAFE
43
// RUN: %clangxx -fsycl -fsycl-targets=amd_gpu_gfx906 %s -mllvm --amdgpu-oclc-unsafe-int-atomics=true -S -emit-llvm -o - | FileCheck %s --check-prefixes=CHECK,CHECK-UNSAFE
54
// RUN: %clangxx -fsycl -fsycl-targets=amd_gpu_gfx90a %s -mllvm --amdgpu-oclc-unsafe-fp-atomics=true -mllvm --amdgpu-oclc-unsafe-int-atomics=true -S -emit-llvm -o - | FileCheck %s --check-prefixes=CHECK,CHECK-UNSAFE-FP
@@ -27,16 +26,14 @@ SYCL_EXTERNAL void fpAtomicFunc(float *f, double *d) {
2726
.fetch_add(1.0f);
2827
// CHECK: void{{.*}}fpAtomicFunc
2928
// CHECK-SAFE: atomicrmw volatile fadd
30-
// CHECK-SAFE-NOT: llvm.amdgcn.global.atomic.fadd.f32
31-
// CHECK-UNSAFE-FP: llvm.amdgcn.global.atomic.fadd.f32
32-
// CHECK-UNSAFE-FP-NOT: atomicrmw volatile fadd
29+
// CHECK-SAFE-NOT: amdgpu.ignore.denormal.mode
30+
// CHECK-UNSAFE-FP: atomicrmw volatile fadd {{.*}}!amdgpu.no.fine.grained.memory{{.*}}!amdgpu.ignore.denormal.mode
3331
sycl::atomic_ref<double, sycl::memory_order_relaxed,
3432
sycl::memory_scope_device,
3533
sycl::access::address_space::global_space>(*d)
3634
.fetch_add(1.0);
3735
// CHECK-SAFE: cmpxchg
3836
// CHECK-SAFE-NOT: llvm.amdgcn.global.atomic.fadd.f64
39-
// CHECK-UNSAFE-FP: llvm.amdgcn.global.atomic.fadd.f64
40-
// CHECK-UNSAFE-FP-NOT: cmpxchg
37+
// CHECK-UNSAFE-FP: atomicrmw volatile fadd {{.*}}!amdgpu.no.fine.grained.memory
4138
// CHECK: __CLANG_OFFLOAD_BUNDLE____END__ sycl-amdgcn-amd-amdhsa-
4239
}

0 commit comments

Comments
 (0)