[AddressSanitizer] Add support for (constant-)masked loads and stores.
authorFilipe Cabecinhas <me@filcab.net>
Tue, 15 Nov 2016 22:37:30 +0000 (22:37 +0000)
committerFilipe Cabecinhas <me@filcab.net>
Tue, 15 Nov 2016 22:37:30 +0000 (22:37 +0000)
commitec350b71fa69ebffb70d0dcb30c73a622742e1d8
tree3a2f2c82f3636d360c2ca1e36d049d504b58960b
parent9a4ce290d0524b8c84e3d18db8f504e834f331ca
[AddressSanitizer] Add support for (constant-)masked loads and stores.

This patch adds support for instrumenting masked loads and stores under
ASan, if they have a constant mask.

isInterestingMemoryAccess now supports returning a mask to be applied to
the loads, and instrumentMop will use it to generate additional checks.

Added tests for v4i32 v8i32, and v4p0i32 (~v4i64) for both loads and
stores (as well as a test to verify we don't add checks to non-constant
masks).

Differential Revision: https://reviews.llvm.org/D26230

llvm-svn: 287047
llvm/lib/Transforms/Instrumentation/AddressSanitizer.cpp
llvm/test/Instrumentation/AddressSanitizer/asan-masked-load-store.ll [new file with mode: 0644]