Atomic functions are semi-hot in profiles.
The CHECKs verify values passed by compiler
and they never fired, so replace them with DCHECKs.
Details
Details
Diff Detail
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
Comment Actions
Turns out that Clang turns invalid orders into 0==relaxed: https://godbolt.org/z/nrz44zoMn
GCC doesn't seem to do so and happily passes the invalid order to the runtime.
It may still be a valid debugging aid to users if we ever expect Clang to change that. Other than that, one would hope that the incorrect memory order would eventually manifest in a reported data race.
Comment Actions
Yes, clang now handles this in the compiler. I don't want to introduce runtime overhead only for gcc that is not doing the same.