OSDN Git Service

[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)
commitce26290c520b64187174b1c3488f9d21db02fd4f
tree685b4a36e716a2b1974921a2b286e7521ea7d925
parentc8094cab486bc4a7b697ddba93502d694d13f6b1
[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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@287047 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Transforms/Instrumentation/AddressSanitizer.cpp
test/Instrumentation/AddressSanitizer/asan-masked-load-store.ll [new file with mode: 0644]