[asan] one more workaround for PR17409: don't do BB-level coverage instrumentation...
[oota-llvm.git] / test / Instrumentation / AddressSanitizer / instrumentation-with-call-threshold.ll
1 ; Test asan internal compiler flags:
2 ;   -asan-instrumentation-with-call-threshold
3 ;   -asan-memory-access-callback-prefix
4
5 ; RUN: opt < %s -asan -asan-module -asan-instrumentation-with-call-threshold=1 -S | FileCheck %s --check-prefix=CHECK-CALL
6 ; RUN: opt < %s -asan -asan-module -asan-instrumentation-with-call-threshold=0 -S | FileCheck %s --check-prefix=CHECK-CALL
7 ; RUN: opt < %s -asan -asan-module -asan-instrumentation-with-call-threshold=0 -asan-memory-access-callback-prefix=__foo_ -S | FileCheck %s --check-prefix=CHECK-CUSTOM-PREFIX
8 ; RUN: opt < %s -asan -asan-module -asan-instrumentation-with-call-threshold=5 -S | FileCheck %s --check-prefix=CHECK-INLINE
9 ; RUN: opt < %s -asan -asan-module  -S | FileCheck %s --check-prefix=CHECK-INLINE
10 target datalayout = "e-p:64:64:64-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:64:64-f32:32:32-f64:64:64-v64:64:64-v128:128:128-a0:0:64-s0:64:64-f80:128:128-n8:16:32:64"
11 target triple = "x86_64-unknown-linux-gnu"
12
13 define void @test_load(i32* %a, i64* %b) sanitize_address {
14 entry:
15 ; CHECK-CALL: call void @__asan_load4
16 ; CHECK-CALL: call void @__asan_load8
17 ; CHECK-CUSTOM-PREFIX: call void @__foo_load4
18 ; CHECK-CUSTOM-PREFIX: call void @__foo_load8
19 ; CHECK-INLINE-NOT: call void @__asan_load
20   %tmp1 = load i32* %a
21   %tmp2 = load i64* %b
22   ret void
23 }
24
25