1 ; RUN: opt -S -passes='function(ee-instrument),cgscc(inline),function(ee-instrument<post-inline>)' %s | llc -mtriple=powerpc64-unknown-linux-gnu | FileCheck %s
3 ; The run-line mimics how Clang might run the instrumentation passes.
5 target datalayout = "E-m:e-i64:64-n32:64"
8 define void @leaf_function() #0 {
12 ; CHECK-LABEL: leaf_function:
15 ; CHECK: bl __cyg_profile_func_enter
17 ; CHECK: bl __cyg_profile_func_exit
23 define void @root_function() #0 {
25 call void @leaf_function()
28 ; CHECK-LABEL: root_function:
31 ; CHECK: bl __cyg_profile_func_enter
34 ; Entry and exit calls, inlined from @leaf_function()
35 ; CHECK: bl __cyg_profile_func_enter
37 ; CHECK: bl __cyg_profile_func_exit
40 ; CHECK: bl __cyg_profile_func_exit
45 attributes #0 = { "instrument-function-entry-inlined"="mcount" "instrument-function-entry"="__cyg_profile_func_enter" "instrument-function-exit"="__cyg_profile_func_exit" }