Run DCE after a LoopFlatten test to reduce spurious output [nfc]
[llvm-project.git] / llvm / test / Instrumentation / SanitizerCoverage / chains.ll
blobea3a58aba26a95a1baa1efc9e44d8b0c97d126e0
1 ; RUN: opt < %s -passes='module(sancov-module)' -sanitizer-coverage-level=4 -sanitizer-coverage-trace-pc -sanitizer-coverage-prune-blocks=1  -S | FileCheck %s
3 define i32 @blah(i32) #0 {
4   %2 = icmp sgt i32 %0, 1
5   br i1 %2, label %branch, label %exit
6 ; CHECK: call void @__sanitizer_cov_trace_pc()
8 branch:
9   br label %pos2
10 ; CHECK-LABEL: branch:
11 ; CHECK-NOT: call void @__sanitizer_cov_trace_pc()
13 pos2:
14   br label %pos3
15 ; CHECK-LABEL: pos2:
16 ; CHECK-NOT: call void @__sanitizer_cov_trace_pc()
18 pos3:
19   br label %pos4
20 ; CHECK-LABEL: pos3:
21 ; CHECK-NOT: call void @__sanitizer_cov_trace_pc()
23 pos4:
24   ret i32 0
25 ; CHECK-LABEL: pos4:
26 ; CHECK: call void @__sanitizer_cov_trace_pc()
28 exit:
29   ret i32 0
30 ; CHECK-LABEL: exit:
31 ; CHECK: call void @__sanitizer_cov_trace_pc()