[PATCH] D18164: [tsan] Do not instrument reads/writes to instruction profile counters.

Dmitry Vyukov via llvm-commits llvm-commits at lists.llvm.org
Thu Mar 17 01:31:52 PDT 2016


dvyukov added a comment.

> yes -- C++ memory model does not allow speculative store motion. However in that example,  The compiler can do the following to remove the memory access of x in loop:


I don't see how it relates. Races still lead to undefined behavior.

> DSE won't happen with monotonic used (as below) -- I am not sure if that is a bug.


DSE is permitted by C/C++ standards in this case. So, yes, this is a bug.


http://reviews.llvm.org/D18164





More information about the llvm-commits mailing list