[PATCH] D26266: [tsan] Cast floating-point types correctly when instrumenting atomic accesses

Kuba Brecka via llvm-commits llvm-commits at lists.llvm.org
Wed Nov 2 16:34:02 PDT 2016


kubabrecka created this revision.
kubabrecka added reviewers: dvyukov, zaks.anna.
kubabrecka added a subscriber: llvm-commits.
kubabrecka set the repository for this revision to rL LLVM.
kubabrecka added a project: Sanitizers.

Although rare, atomic accesses to floating-point types seem to be valid, i.e. `%a = load atomic float ...`.  The TSan instrumentation pass however tries to emit `inttoptr`, which is incorrect, we should use a `bitcast` here.  Anyway, IRBuilder already has a convenient helper function for this.


Repository:
  rL LLVM

https://reviews.llvm.org/D26266

Files:
  lib/Transforms/Instrumentation/ThreadSanitizer.cpp
  projects/compiler-rt/test/tsan/Darwin/objc-double-property.mm
  test/Instrumentation/ThreadSanitizer/atomic-non-integer.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D26266.76804.patch
Type: text/x-patch
Size: 4370 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20161102/66a783dc/attachment.bin>


More information about the llvm-commits mailing list