1 ; RUN: opt -passes="ipsccp<func-spec>" -funcspec-min-function-size=3 -S < %s | FileCheck %s
3 ; Checks for callsites that have been annotated with MinSize. We only expect
4 ; specialisation for the call that does not have the attribute:
7 ; CHECK: %tmp0 = call i64 @compute.specialized.1(i64 %x, ptr @plus)
8 ; CHECK: br label %merge
10 ; CHECK: %tmp1 = call i64 @compute(i64 %x, ptr @minus) #0
11 ; CHECK: br label %merge
13 define i64 @main(i64 %x, i1 %flag) {
15 br i1 %flag, label %plus, label %minus
18 %tmp0 = call i64 @compute(i64 %x, ptr @plus)
22 %tmp1 = call i64 @compute(i64 %x, ptr @minus) #0
26 %tmp2 = phi i64 [ %tmp0, %plus ], [ %tmp1, %minus]
30 define internal i64 @compute(i64 %x, ptr %binop) {
32 %tmp0 = call i64 %binop(i64 %x)
36 define internal i64 @plus(i64 %x) {
42 define internal i64 @minus(i64 %x) {
48 attributes #0 = { minsize optsize }