================ @@ -0,0 +1,25 @@ +;; Test if the callee_type metadata is dropped when an indirect function call through a function ptr is promoted +;; to a direct function call during instcombine. + +; RUN: opt < %s -O2 | llvm-dis | FileCheck %s + +define dso_local noundef i32 @_Z13call_indirectPFicEc(ptr noundef %func, i8 noundef signext %x) local_unnamed_addr !type !0 { +entry: + %call = call noundef i32 %func(i8 noundef signext %x), !callee_type !1 + ret i32 %call +} + +define dso_local noundef i32 @_Z3barv() local_unnamed_addr !type !3 { +entry: + ; CHECK: %call.i = tail call noundef i32 @_Z3fooc(i8 noundef signext 97) + ; CHECK-NOT: %call.i = tail call noundef i32 @_Z3fooc(i8 noundef signext 97), !callee_type !1 + %call = call noundef i32 @_Z13call_indirectPFicEc(ptr noundef nonnull @_Z3fooc, i8 noundef signext 97) + ret i32 %call +} + ---------------- Prabhuk wrote:
Can you please explain the case that you are referring to here with a little more detail? https://github.com/llvm/llvm-project/pull/87573 _______________________________________________ llvm-branch-commits mailing list llvm-branch-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits