1 ; If there are two specializations of a function, make sure each callsite
4 ; RUN: opt -S -partialspecialization -disable-inlining %s | opt -S -inline | FileCheck %s -check-prefix=CORRECT
5 ; RUN: opt -S -partialspecialization -disable-inlining %s | FileCheck %s
6 declare void @callback1()
7 declare void @callback2()
9 define internal void @UseCallback(void()* %pCallback) {
10 call void %pCallback()
14 define void @foo(void()* %pNonConstCallback)
18 ; CORRECT-NEXT: call void @callback1()
19 ; CORRECT-NEXT: call void @callback1()
20 ; CORRECT-NEXT: call void @callback2()
21 ; CORRECT-NEXT: call void %pNonConstCallback()
22 ; CORRECT-NEXT: call void @callback1()
23 ; CORRECT-NEXT: call void @callback2()
24 ; CORRECT-NEXT: call void @callback2()
26 ; CHECK-NOT: call void @UseCallback(void ()* @callback1)
27 ; CHECK-NOT: call void @UseCallback(void ()* @callback2)
29 call void @UseCallback(void()* @callback1)
30 call void @UseCallback(void()* @callback1)
31 call void @UseCallback(void()* @callback2)
32 call void @UseCallback(void()* %pNonConstCallback)
33 call void @UseCallback(void()* @callback1)
34 call void @UseCallback(void()* @callback2)
35 call void @UseCallback(void()* @callback2)