https://gcc.gnu.org/bugzilla/show_bug.cgi?id=31170
--- Comment #3 from Andrew Pinski <pinskia at gcc dot gnu.org> --- Note I think the volatile will block ifcvt from doing anything too. The other thing is this thread safe for C++11/C11 memory models. That is does cmpxchgq do a store always or only when the compare is true and is that guaranteed?