1 ; RUN: opt < %s -S -sancov -sanitizer-coverage-level=3 | FileCheck %s
2 ; RUN: opt < %s -S -passes='module(sancov-module)' -sanitizer-coverage-level=3 | FileCheck %s
4 ; The critical edges to unreachable_bb should not be split.
5 define i32 @foo(i32 %c, i32 %d) {
7 ; CHECK: switch i32 [[C:%.*]], label [[UNREACHABLE_BB:%.*]] [
8 ; CHECK-NEXT: i32 0, label %exit0
9 ; CHECK-NEXT: i32 1, label %exit1
10 ; CHECK-NEXT: i32 2, label %cont
13 ; CHECK: switch i32 [[D:%.*]], label [[UNREACHABLE_BB]] [
14 ; CHECK-NEXT: i32 0, label %exit2
15 ; CHECK-NEXT: i32 1, label %exit3
16 ; CHECK-NEXT: i32 2, label %exit4
18 ; CHECK: unreachable_bb:
19 ; CHECK-NEXT: unreachable
21 switch i32 %c, label %unreachable_bb [i32 0, label %exit0
26 switch i32 %d, label %unreachable_bb [i32 0, label %exit2