1 ; RUN: llc -mtriple=x86_64-- -O0 < %s | FileCheck %s
2 ; RUN: llc -mtriple=x86_64-- -O1 < %s | FileCheck %s
3 ; RUN: llc -mtriple=x86_64-- -O2 < %s | FileCheck %s
5 ; The codegen should insert post-inlining instrumentation calls and should not
6 ; insert pre-inlining instrumentation.
8 ; CHECK-NOT: callq __cyg_profile_func_enter
10 define void @leaf_function() #0 {
11 ; CHECK-LABEL: leaf_function:
12 ; CHECK: callq __cyg_profile_func_enter_bare
13 ; CHECK: callq __cyg_profile_func_exit
17 define void @root_function() #0 {
19 ; CHECK-LABEL: root_function:
20 ; CHECK: callq __cyg_profile_func_enter_bare
21 ; CHECK-NEXT: callq leaf_function
22 ; CHECK: callq __cyg_profile_func_exit
23 call void @leaf_function()
27 attributes #0 = { "instrument-function-entry"="__cyg_profile_func_enter" "instrument-function-entry-inlined"="__cyg_profile_func_enter_bare" "instrument-function-exit-inlined"="__cyg_profile_func_exit" }