[clang] [libc++] fix _Atomic c11 compare exchange does not update expected results (#78707)

fixes #30023

The issue is that for compare exchange builtin, if the type's size is
not power of 2, it creates a temporary of size power of 2, then emit the
compare exchange operation. And later, the results of the compare
exchange operation has two components: 1. a boolean whether or not the
exchange happens. 2. the old value
we are supposed to write the old value into user's "expected" value.
However, in case the type is not power of 2, what we actually wrote to
is the temporary that was created.

The fix is to pass the "expected" address all the way down so it can
wrote to the correct address

NOKEYCHECK=True
GitOrigin-RevId: b2574c9dad487be92605316efd929738a5f6d851
1 file changed