45 lines · plain
1; RUN: opt -passes="ipsccp<func-spec>" -funcspec-min-function-size=3 -S < %s | FileCheck %s2 3; Checks for callsites that have been annotated with MinSize. No specialisation4; expected here:5;6; CHECK-NOT: @compute.specialized.17; CHECK-NOT: @compute.specialized.28 9define i64 @main(i64 %x, i1 %flag) {10entry:11 br i1 %flag, label %plus, label %minus12 13plus:14 %tmp0 = call i64 @compute(i64 %x, ptr @plus) #015 br label %merge16 17minus:18 %tmp1 = call i64 @compute(i64 %x, ptr @minus) #019 br label %merge20 21merge:22 %tmp2 = phi i64 [ %tmp0, %plus ], [ %tmp1, %minus]23 ret i64 %tmp224}25 26define internal i64 @compute(i64 %x, ptr %binop) {27entry:28 %tmp0 = call i64 %binop(i64 %x)29 ret i64 %tmp030}31 32define internal i64 @plus(i64 %x) {33entry:34 %tmp0 = add i64 %x, 135 ret i64 %tmp036}37 38define internal i64 @minus(i64 %x) {39entry:40 %tmp0 = sub i64 %x, 141 ret i64 %tmp042}43 44attributes #0 = { minsize optsize }45