1 ; Test -sanitizer-coverage-inline-8bit-counters=1
2 ; RUN: opt < %s -passes='module(sancov-module)' -sanitizer-coverage-level=1 -sanitizer-coverage-trace-loads=1 -S | FileCheck %s --check-prefix=LOADS
3 ; RUN: opt < %s -passes='module(sancov-module)' -sanitizer-coverage-level=1 -sanitizer-coverage-trace-stores=1 -S | FileCheck %s --check-prefix=STORES
5 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"
6 target triple = "x86_64-unknown-linux-gnu"
7 define void @foo(ptr %p1, ptr %p2, ptr %p4, ptr %p8, ptr %p16) {
8 ; =================== loads
10 %2 = load i16, ptr %p2
11 %3 = load i32, ptr %p4
12 %4 = load i64, ptr %p8
13 %5 = load i128, ptr %p16
14 ; LOADS: call void @__sanitizer_cov_load1(ptr %p1)
15 ; LOADS: call void @__sanitizer_cov_load2(ptr %p2)
16 ; LOADS: call void @__sanitizer_cov_load4(ptr %p4)
17 ; LOADS: call void @__sanitizer_cov_load8(ptr %p8)
18 ; LOADS: call void @__sanitizer_cov_load16(ptr %p16)
20 ; =================== stores
25 store i128 %5, ptr %p16
26 ; STORES: call void @__sanitizer_cov_store1(ptr %p1)
27 ; STORES: call void @__sanitizer_cov_store2(ptr %p2)
28 ; STORES: call void @__sanitizer_cov_store4(ptr %p4)
29 ; STORES: call void @__sanitizer_cov_store8(ptr %p8)
30 ; STORES: call void @__sanitizer_cov_store16(ptr %p16)