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