[llvm-branch-commits] [clang] [llvm] [llvm] Introduce callee_type metadata (PR #87573)

Matt Arsenault via llvm-branch-commits llvm-branch-commits at lists.llvm.org
Wed May 21 14:07:12 PDT 2025


================
@@ -0,0 +1,26 @@
+;; Test if the callee_type metadata is dropped when it is
+;; is mapped to a direct function call from an indirect call during inlining.
+
+; RUN: opt -passes="inline" -S < %s | FileCheck %s
+
+define i32 @_Z13call_indirectPFicEc(ptr %func, i8 %x) local_unnamed_addr !type !0 {
+entry:
+  %call = call i32 %func(i8 %x), !callee_type !1
+  ret i32 %call
+}
+
+define i32 @_Z3barv() local_unnamed_addr !type !3 {
+entry:
+  ; CHECK-LABEL: define i32 @_Z3barv()
+  ; CHECK-NEXT: entry:
+  ; CHECK-NOT: !callee_type
----------------
arsenm wrote:

NOT checks are fragile, use update_test_checks 

https://github.com/llvm/llvm-project/pull/87573


More information about the llvm-branch-commits mailing list