1 ; RUN: opt -passes=hotcoldsplit -hotcoldsplit-threshold=-1 -pass-remarks=hotcoldsplit -enable-cold-section=true -S < %s 2>&1 | FileCheck %s
3 ; This test case is copied over from split-cold-2.ll, modified
4 ; to test the `-enable-cold-section` parameter in opt.
5 ; Make sure this compiles. This test used to fail with an invalid phi node: the
6 ; two predecessors were outlined and the SSA representation was invalid.
8 ; CHECK: remark: <unknown>:0:0: fun split cold code into fun.cold.1
11 ; CHECK-NEXT: call void @fun.cold.1
13 ; CHECK: define {{.*}}@fun.cold.1{{.*}} [[cold_attr:#[0-9]+]] section "__llvm_cold"
14 ; CHECK: attributes [[cold_attr]] = { {{.*}}noreturn
18 br i1 undef, label %if.then, label %if.else
27 br i1 undef, label %if.then5, label %if.end
36 %cleanup.dest.slot.0 = phi i32 [ 1, %if.then5 ], [ 0, %if.end ]