1; RUN: opt < %s -passes=pgo-instr-gen -S | FileCheck %s --implicit-check-not='llvm.instrprof.' --check-prefixes=CHECK,ALL 2; RUN: opt < %s -passes=pgo-instr-gen -pgo-function-size-threshold=2 -S | FileCheck %s --implicit-check-not='llvm.instrprof.' --check-prefixes=CHECK,ALL 3; RUN: opt < %s -passes=pgo-instr-gen -pgo-function-size-threshold=3 -S | FileCheck %s --implicit-check-not='llvm.instrprof.' 4target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" 5target triple = "x86_64-unknown-linux-gnu" 6 7; CHECK-LABEL: define i32 @small( 8define i32 @small(i32 %i) { 9 ; ALL: call void @llvm.instrprof.increment({{.*}}) 10 %add = add i32 %i, 4 11 ret i32 %add 12} 13 14; CHECK-LABEL: define i32 @large( 15define i32 @large(i32 %0) { 16 ; CHECK: call void @llvm.instrprof.increment({{.*}}) 17 %2 = shl nsw i32 %0, 3 18 %3 = or i32 %2, 4 19 %4 = mul i32 %3, %0 20 %5 = or i32 %4, 3 21 %6 = sdiv i32 2, %0 22 %7 = add nsw i32 %5, %6 23 %8 = mul nsw i32 %0, %0 24 %9 = udiv i32 5, %8 25 %10 = add nsw i32 %7, %9 26 ret i32 %10 27} 28 29; CHECK: declare void @llvm.instrprof.increment({{.*}}) 30