2 ; RUN: opt -hotcoldsplit -debug-only=hotcoldsplit -hotcoldsplit-threshold=2 -hotcoldsplit-max-params=2 -S < %s -o /dev/null 2>&1 | FileCheck %s
4 declare void @sink(i32*, i32, i32) cold
8 define void @foo(i32 %arg) {
9 %local = load i32, i32* @g
10 br i1 undef, label %cold, label %exit
13 ; CHECK: Applying penalty for splitting: 2
14 ; CHECK-NEXT: Applying penalty for: 2 params
15 ; CHECK-NEXT: Applying penalty for: 0 outputs/split phis
16 ; CHECK-NEXT: penalty = 6
17 call void @sink(i32* @g, i32 %arg, i32 %local)
24 define void @bar(i32* %p1, i32 %p2, i32 %p3) {
25 br i1 undef, label %cold, label %exit
28 ; CHECK: Applying penalty for splitting: 2
29 ; CHECK-NEXT: 3 inputs and 0 outputs exceeds parameter limit (2)
30 ; CHECK-NEXT: penalty = 2147483647
31 call void @sink(i32* %p1, i32 %p2, i32 %p3)