1 ; Test -sanitizer-coverage-pc-table=1
2 ; RUN: opt < %s -passes='module(sancov-module)' -sanitizer-coverage-level=3 -sanitizer-coverage-trace-pc-guard -sanitizer-coverage-pc-table=1 -S | FileCheck %s
3 ; RUN: opt < %s -passes='module(sancov-module)' -sanitizer-coverage-level=3 -sanitizer-coverage-inline-8bit-counters -sanitizer-coverage-pc-table=1 -S | FileCheck %s
4 ; RUN: opt < %s -passes='module(sancov-module)' -sanitizer-coverage-level=3 -sanitizer-coverage-inline-bool-flag -sanitizer-coverage-pc-table=1 -S | FileCheck %s
6 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"
7 target triple = "x86_64-unknown-linux-gnu"
8 define void @foo(ptr %a) sanitize_address {
10 %tobool = icmp eq ptr %a, null
11 br i1 %tobool, label %if.end, label %if.then
13 if.then: ; preds = %entry
14 store i32 0, ptr %a, align 4
17 if.end: ; preds = %entry, %if.then
21 ; CHECK: private constant [6 x ptr] [ptr @foo, ptr inttoptr (i64 1 to ptr), ptr blockaddress(@foo, %entry.if.end_crit_edge), ptr null, ptr blockaddress(@foo, %if.then), ptr null], section "__sancov_pcs", comdat($foo), align 8
22 ; CHECK: @__start___sancov_pcs = extern_weak hidden global i64
23 ; CHECK-NEXT: @__stop___sancov_pcs = extern_weak hidden global i64
24 ; CHECK: define internal void @sancov.module_ctor
25 ; CHECK: call void @__sanitizer_cov
26 ; CHECK: call void @__sanitizer_cov_pcs_init