I think it's worth to create a new file Atomic.cpp.
the indent is off here
This doesn't look right. The integer value after type punning doesn't conform with the same arithmetic as the original floating-point value. Actually we already have atomicrmw fmax/fmin in LLVM.
okay, currently clang doesn't support the floating-point builtins yet. One alternative is to use OpenMP atomic directive here, but I'm also fine if the currently scheme could work. We can revisit this part later when we have the support in the compiler.