| Issue |
61410
|
| Summary |
Compiling atomic builtins for NVPTX emits unhelpful warnings
|
| Labels |
clang:diagnostics,
backend:NVPTX
|
| Assignees |
|
| Reporter |
jhuber6
|
Using some atomic builtins emits unhelpful warnings, warning that the maximum lock free size is zero.
```
void foo(int *ptr) {
__atomic_store_n(ptr, 1, __ATOMIC_RELAXED);
}
```
```
clang foo.c --target=nvptx64-nvidia-cuda
<foo.c>:2:5: warning: large atomic operation may incur significant performance penalty; the access size (4 bytes) exceeds the max lock-free size (0 bytes) [-Watomic-alignment]
__atomic_store_n(ptr, 1, __ATOMIC_RELAXED);
^
```
And in godbolt https://godbolt.org/z/3be3rjE9f.
_______________________________________________
llvm-bugs mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs