1 ; Supplement instr profile suppl-profile.proftext with sample profile
2 ; sample-profile.proftext.
3 ; RUN: llvm-profdata merge -instr -suppl-min-size-threshold=0 \
4 ; RUN: -supplement-instr-with-sample=%p/Inputs/sample-profile.proftext \
5 ; RUN: %S/Inputs/suppl-profile.proftext -o %t.profdata
6 ; RUN: opt < %s -pgo-instr-use -pgo-test-profile-file=%t.profdata -S | FileCheck %s
7 ; RUN: opt < %s -passes=pgo-instr-use -pgo-test-profile-file=%t.profdata -S | FileCheck %s
9 target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
10 target triple = "x86_64-unknown-linux-gnu"
12 ; Check test_simple_for has a non-zero entry count and doesn't have any other
14 ; CHECK: @test_simple_for(i32 %n) {{.*}} !prof ![[ENTRY_COUNT:[0-9]+]]
16 ; CHECK: ![[ENTRY_COUNT]] = !{!"function_entry_count", i64 540}
17 define i32 @test_simple_for(i32 %n) {
22 %i = phi i32 [ 0, %entry ], [ %inc1, %for.inc ]
23 %sum = phi i32 [ 1, %entry ], [ %inc, %for.inc ]
24 %cmp = icmp slt i32 %i, %n
25 br i1 %cmp, label %for.body, label %for.end
28 %inc = add nsw i32 %sum, 1
32 %inc1 = add nsw i32 %i, 1