Looks great! ================ Comment at: lib/Transforms/Instrumentation/MemorySanitizer.cpp:1327 @@ +1326,3 @@ + bool WritesMemory = IK == IK_WritesMemory; + assert(!(ReadsMemory && WritesMemory)); + ---------------- Can't we ever fail here (e.g. a CAS?) http://llvm-reviews.chandlerc.com/D184