[clang] [llvm] wip: Move instrumentation passes (PR #92171)
Egor Pasko via cfe-commits
cfe-commits at lists.llvm.org
Thu May 23 07:48:16 PDT 2024
================
@@ -0,0 +1,44 @@
+; RUN: opt -passes="default<O0>" -S < %s | FileCheck -check-prefix=PRELTO %s
+; RUN: opt -passes="default<O1>" -S < %s | FileCheck -check-prefix=PRELTO %s
+; RUN: opt -passes="thinlto-pre-link<O0>,thinlto<O0>" -S < %s | FileCheck -check-prefix=PRELTO %s
+; RUN: opt -passes="thinlto-pre-link<O2>" -S < %s | FileCheck -check-prefix=PRELTO %s
+; RUN: opt -passes="thinlto<O2>" -S < %s | FileCheck -check-prefix=LTO %s
+; RUN: opt -passes="lto<O2>" -S < %s | FileCheck -check-prefix=LTO %s
+
+; Pre-inline instrumentation should be inserted, but not by LTO/ThinLTO passes.
+
+target triple = "x86_64-unknown-linux"
+
+define void @leaf_function() #0 {
+entry:
+ ret void
+; PRELTO-LABEL: entry:
+; PRELTO-NEXT: %0 ={{( tail)?}} call ptr @llvm.returnaddress(i32 0)
----------------
pasko wrote:
Done.
https://github.com/llvm/llvm-project/pull/92171
More information about the cfe-commits
mailing list