1 ; Check that '__attribute__((always_inline)) inline' functions are inlined.
3 ; RUN: opt < %s -mtriple=x86_64-apple-macosx10.10.0 -passes='instrprof,inline' -S | FileCheck %s
5 target datalayout = "e-m:o-i64:64-f80:128-n8:16:32:64-S128"
6 target triple = "x86_64-apple-macosx10.13.0"
8 ;; Don't record the address of an available_externally alwaysinline function.
9 ; CHECK: @__profd_foo = linkonce_odr hidden global
11 ; CHECK-SAME: , align 8
13 @__profn_foo = linkonce_odr hidden constant [3 x i8] c"foo"
19 %call = call i32 @foo()
23 declare void @llvm.instrprof.increment(ptr, i64, i32, i32) #0
25 define available_externally i32 @foo() #1 {
27 call void @llvm.instrprof.increment(ptr @__profn_foo, i64 0, i32 1, i32 0)
31 attributes #0 = { nounwind }
32 attributes #1 = { alwaysinline }
34 !llvm.module.flags = !{!0}
35 !0 = !{i32 2, !"EnableValueProfiling", i32 1}