llvm / llvm/llvm-project

Spurious clang-cl warnings compiling atomics for ARM64EC

Open
#159,229 3 comments 0 reactions 0 assignees View on GitHub
backend:AArch64 clang-cl clang:diagnostics platform:windows
Dominant language
LLVM
Stars
40.5k
Forks
18.7k
PR merge metrics
PR metrics pending

Description

The problem is only reproducible when compiling ARM64EC targets. Using std::atomic_bool::load, std::atomic_signal_fence and others produce warnings: '+cx16' is not a recognized feature for this target (ignoring feature)

Compiling for ARM64, AMD64 does not produce the warnings.

clang-cl --version
clang version 21.1.0
Target: x86_64-pc-windows-msvc
Thread model: posix

test.cpp:
#include \
int main()
{
std::atomic_signal_fence(std::memory_order_seq_cst);
return 0;
}

test.cpp (another example):
#include \
int main()
{
std::atomic_bool test {false};
auto t = test.load(std::memory_order_seq_cst);
return 0;
}

clang-cl --target=arm64ec-pc-windows-msvc test.cpp
'+cx16' is not a recognized feature for this target (ignoring feature)
'+cx16' is not a recognized feature for this target (ignoring feature)

clang-cl --target=arm64-pc-windows-msvc test.cpp
(empty output)

clang-cl --target=amd64-pc-windows-msvc test.cpp
(empty output)

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.