1 ; Test the critical edge threahold
2 ; RUN: opt < %s -passes=pgo-instr-gen -pgo-critical-edge-threshold=1 -pgo-instrument-entry=true -S | FileCheck %s
4 @sum = dso_local global i32 0, align 4
6 define void @foo(i32 %a, i32 %b) {
8 %tobool.not = icmp eq i32 %a, 0
9 br i1 %tobool.not, label %if.end4, label %if.then
12 %0 = load i32, ptr @sum, align 4
13 %inc = add nsw i32 %0, 1
14 store i32 %inc, ptr @sum, align 4
15 %tobool1.not = icmp eq i32 %b, 0
16 br i1 %tobool1.not, label %if.end4, label %if.then2
19 %inc3 = add nsw i32 %0, 2
20 store i32 %inc3, ptr @sum, align 4
27 ; CHECK-NOT: call void @llvm.instrprof.increment(ptr @__profn_foo