1; RUN: opt -hotcoldsplit -hotcoldsplit-threshold=-1 -pass-remarks=hotcoldsplit -S < %s 2>&1 | FileCheck %s 2; RUN: opt -passes=hotcoldsplit -hotcoldsplit-threshold=-1 -pass-remarks=hotcoldsplit -S < %s 2>&1 | FileCheck %s 3 4; Make sure this compiles. This test used to fail with an invalid phi node: the 5; two predecessors were outlined and the SSA representation was invalid. 6 7; CHECK: remark: <unknown>:0:0: fun split cold code into fun.cold.1 8; CHECK-LABEL: @fun 9; CHECK: codeRepl: 10; CHECK-NEXT: call void @fun.cold.1 11 12; CHECK: define {{.*}}@fun.cold.1{{.*}} [[cold_attr:#[0-9]+]] 13; CHECK: attributes [[cold_attr]] = { {{.*}}noreturn 14 15define void @fun() { 16entry: 17 br i1 undef, label %if.then, label %if.else 18 19if.then: 20 ret void 21 22if.else: 23 br label %if.then4 24 25if.then4: 26 br i1 undef, label %if.then5, label %if.end 27 28if.then5: 29 br label %cleanup 30 31if.end: 32 br label %cleanup 33 34cleanup: 35 %cleanup.dest.slot.0 = phi i32 [ 1, %if.then5 ], [ 0, %if.end ] 36 unreachable 37} 38