[MSan] Don't emit __msan_instrument_asm_load() calls
authorAlexander Potapenko <glider@google.com>
Thu, 20 Dec 2018 10:05:00 +0000 (10:05 +0000)
committerAlexander Potapenko <glider@google.com>
Thu, 20 Dec 2018 10:05:00 +0000 (10:05 +0000)
commit0e3b85a730bc3ef2bcbc22bff33678005df9bafa
treeef3ef9f3fce9306403be164adabfd10ce8e96cb9
parente22cf4d7cb2e33d05d564932342023ec376a88fc
[MSan] Don't emit __msan_instrument_asm_load() calls

LLVM treats void* pointers passed to assembly routines as pointers to
sized types.
We used to emit calls to __msan_instrument_asm_load() for every such
void*, which sometimes led to false positives.
A less error-prone (and truly "conservative") approach is to unpoison
only assembly output arguments.

llvm-svn: 349734
llvm/lib/Transforms/Instrumentation/MemorySanitizer.cpp
llvm/test/Instrumentation/MemorySanitizer/msan_asm_conservative.ll