================
@@ -0,0 +1,29 @@
+; RUN: llc -mtriple=x86_64-- -O0 < %s | FileCheck %s
+; RUN: llc -mtriple=x86_64-- -O1 < %s | FileCheck %s
+; RUN: llc -mtriple=x86_64-- -O2 < %s | FileCheck %s
+
+; The codegen should insert post-inlining instrumentation calls and should not
+; insert pre-inlining instrumentation.
+
+; CHECK-NOT: callq __cyg_profile_func_enter
+
+define void @leaf_function() #0 {
+; CHECK-LABEL: leaf_function:
+; CHECK: callq __cyg_profile_func_enter_bare
+; CHECK: movq leaf_function@GOTPCREL(%rip), %rdi
----------------
aeubanks wrote:
checking the specifics of how the function is called shouldn't be in this test
that tests the pipeline, the point of this test is just a quick end-to-end test
testing we inserted instrumentation. if we want to test this we should have a
separate test focused on the exact instruction sequence. but I don't think we
need to add that test coverage in this PR
so I'd remove the `%rdi` CHECK line
https://github.com/llvm/llvm-project/pull/92171
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits