
Set MaxAtomicInlineWidth the same way as SPIR-V targets in 3cfd0c0d3697. This PR fixes build warning in scoped atomic built-in in #146814: `warning: large atomic operation may incur significant performance penalty; ; the access size (2 bytes) exceeds the max lock-free size (0 bytes) [-Watomic-alignment]`
19 lines
466 B
Common Lisp
19 lines
466 B
Common Lisp
// RUN: %clang_cc1 %s -cl-std=CL2.0 -emit-llvm -o - -triple spir-unknown-unknown -verify
|
|
// RUN: %clang_cc1 %s -cl-std=CL2.0 -emit-llvm -o - -triple spir64-unknown-unknown -verify
|
|
|
|
// expected-no-diagnostics
|
|
|
|
int fi1a(int *i) {
|
|
int v;
|
|
__scoped_atomic_load(i, &v, __ATOMIC_RELAXED, __MEMORY_SCOPE_DEVICE);
|
|
return v;
|
|
}
|
|
|
|
#ifdef __SPIR64__
|
|
long fl1a(long *i) {
|
|
long v;
|
|
__scoped_atomic_load(i, &v, __ATOMIC_RELAXED, __MEMORY_SCOPE_DEVICE);
|
|
return v;
|
|
}
|
|
#endif
|