[PATCH] D108555: [tsan] Make sanitize-thread-disable.c an X86-only test

Marco Elver via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Mon Aug 23 06:59:29 PDT 2021


melver added inline comments.


================
Comment at: clang/test/CodeGen/X86/sanitize-thread-disable.c:22
 int instrumented1(int *a, _Atomic int *b) {
   return *a + atomic_load(b);
 }
----------------
I think you do not need to use atomic_load.

You can just deref b, and because it's _Atomic type it *should* just use an atomic seq_cst load implicitly.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D108555/new/

https://reviews.llvm.org/D108555



More information about the cfe-commits mailing list