Hi, I noticed PR71716 and I want to enable ATOMIC_COMPARE_EXCHANGE internal-fn 
optimization
for floating type or types contains padding (e.g., long double). Please tell me 
if I happen to
make any mistakes, Thanks!

Firstly, about the concerns of sNaNs float/double value, it seems work well and 
shall have been
covered by testsuite/gcc.dg/atomic/c11-atomic-exec-5.c

Secondly, since ATOMIC_COMPARE_EXCHANGE is only enabled when expected var is 
only addressable
because of the call, the padding bits can not be modified by any other stmts. 
So we can save all
bits after ATOMIC_COMPARE_EXCHANGE call and extract the padding bits. After 
first iteration, the
extracted padding bits can be mixed with the expected var.

Bootstrapped/regtested on x86_64-linux.

Reply via email to