================
@@ -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
_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to