Hi,
Have noticed a difference between what clang and gcc emits when istrumenting something that is an inplace operation such as "*anintpointer |= 1".
gcc emits both __tsan_read4 and __tsan_write4 calls while clang only emits a call to __tsan_write4
Is this an intentional optimization that is done in the clang/llvm implementation (and thus a missed optimization in gcc)? Or is this an inaccuracy in the clang/llvm implementation?
(we have our own runtime that currently just borrows the tsan instrumentation to trace memory accesses for other reasons. This is why we have notice this)