[clang] [llvm] wip: Move instrumentation passes (PR #92171)
Arthur Eubanks via llvm-commits
llvm-commits at lists.llvm.org
Wed May 22 14:03:05 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)
----------------
aeubanks wrote:
no need to add `{{( tail)?}}` if it's at the very beginning. for this specific CHECK line I'd simplify to `{{.*}}`
https://github.com/llvm/llvm-project/pull/92171
More information about the llvm-commits
mailing list