1 ; RUN: opt -S -hotcoldsplit -hotcoldsplit-threshold=0 < %s | FileCheck %s
3 target datalayout = "e-m:o-i64:64-f80:128-n8:16:32:64-S128"
4 target triple = "x86_64-apple-macosx10.14.0"
6 ; CHECK-LABEL: define {{.*}}@foo(
7 ; CHECK: phi i32 [ 0, %entry ], [ %p.ce.reload, %codeRepl ]
9 ; CHECK-LABEL: define {{.*}}@foo.cold.1(
10 ; CHECK: call {{.*}}@sink
11 ; CHECK: %p.ce = phi i32 [ 1, %coldbb ], [ 3, %coldbb2 ]
12 ; CHECK-NEXT: store i32 %p.ce, i32* %p.ce.out
14 define void @foo(i32 %cond) {
16 %tobool = icmp eq i32 %cond, 0
17 br i1 %tobool, label %if.end, label %coldbb
21 call void @sideeffect()
22 br i1 undef, label %if.end, label %coldbb2
28 %p = phi i32 [0, %entry], [1, %coldbb], [3, %coldbb2]
32 declare void @sink() cold
34 declare void @sideeffect()