1 ; Test to ensure that the inlining cost model isn't tripped up by dead constant users.
2 ; In this case, the call to g via a bitcasted function pointer is canonicalized to
3 ; a direct call to g with bitcasted arguments, leaving the original bitcast
6 ; RUN: opt < %s -passes='function(instcombine),cgscc(inline)' -pass-remarks=inline -S 2>&1 \
9 ; Inline costs of f and g should be the same.
11 ; CHECK: 'f' inlined into 'h' with (cost=[[EXPECTED_COST:.+]], threshold={{.+}})
12 ; CHECK: 'g' inlined into 'h' with (cost=[[EXPECTED_COST]], threshold={{.+}})
14 %0 = type { i64, i64, i64 }
15 %1 = type { i64, i64, i64 }
17 define internal void @f(ptr align 8 %a) unnamed_addr {
22 define internal void @g(ptr align 8 %a) unnamed_addr {
27 define void @h(ptr align 8 %a, ptr align 8 %b) unnamed_addr {
29 call void @f(ptr align 8 %a)
30 call void @g(ptr align 8 %b)