File tree Expand file tree Collapse file tree 1 file changed +8
-8
lines changed
llvm/test/Transforms/InstCombine Expand file tree Collapse file tree 1 file changed +8
-8
lines changed Original file line number Diff line number Diff line change 11;; Test if the callee_type metadata is dropped when an indirect function call through a function ptr is promoted
22;; to a direct function call during instcombine.
33
4- ; RUN: opt < %s -O2 | llvm-dis | FileCheck %s
4+ ; RUN: opt < %s -passes="cgscc(inline),instcombine" -S | FileCheck %s
55
6- define dso_local noundef i32 @_Z13call_indirectPFicEc (ptr noundef %func , i8 noundef signext %x ) local_unnamed_addr !type !0 {
6+ define i32 @_Z13call_indirectPFicEc (ptr %func , i8 %x ) local_unnamed_addr !type !0 {
77entry:
8- %call = call noundef i32 %func (i8 noundef signext %x ), !callee_type !1
8+ %call = call i32 %func (i8 %x ), !callee_type !1
99 ret i32 %call
1010}
1111
12- define dso_local noundef i32 @_Z3barv () local_unnamed_addr !type !3 {
12+ define i32 @_Z3barv () local_unnamed_addr !type !3 {
1313entry:
14- ; CHECK: %call.i = tail call noundef i32 @_Z3fooc(i8 noundef signext 97)
15- ; CHECK-NOT: %call.i = tail call noundef i32 @_Z3fooc(i8 noundef signext 97), !callee_type !1
16- %call = call noundef i32 @_Z13call_indirectPFicEc (ptr noundef nonnull @_Z3fooc , i8 noundef signext 97 )
14+ ; CHECK: %call.i = call i32 @_Z3fooc(i8 97)
15+ ; CHECK-NOT: %call.i = call i32 @_Z3fooc(i8 97), !callee_type !1
16+ %call = call i32 @_Z13call_indirectPFicEc (ptr nonnull @_Z3fooc , i8 97 )
1717 ret i32 %call
1818}
1919
20- declare !type !2 noundef i32 @_Z3fooc (i8 noundef signext )
20+ declare !type !2 i32 @_Z3fooc (i8 signext )
2121
2222!0 = !{i64 0 , !"_ZTSFiPvcE.generalized" }
2323!1 = !{!2 }
You can’t perform that action at this time.
0 commit comments