28 lines · plain
1; RUN: llc -mtriple=x86_64-- -O0 < %s | FileCheck %s2; RUN: llc -mtriple=x86_64-- -O1 < %s | FileCheck %s3; RUN: llc -mtriple=x86_64-- -O2 < %s | FileCheck %s4 5; The codegen should insert post-inlining instrumentation calls and should not6; insert pre-inlining instrumentation.7 8; CHECK-NOT: callq __cyg_profile_func_enter9 10define void @leaf_function() #0 {11; CHECK-LABEL: leaf_function:12; CHECK: callq __cyg_profile_func_enter_bare13; CHECK: callq __cyg_profile_func_exit14 ret void15}16 17define void @root_function() #0 {18entry:19; CHECK-LABEL: root_function:20; CHECK: callq __cyg_profile_func_enter_bare21; CHECK-NEXT: callq leaf_function22; CHECK: callq __cyg_profile_func_exit23 call void @leaf_function()24 ret void25}26 27attributes #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" }28