Files
clang-p2996/llvm/test/Transforms/HotColdSplit/split-cold-1.ll
Sebastian Pop 0f30f08b02 HotColdSplit: fix invalid SSA due to outlining
The test used to fail with an invalid phi node: the two predecessors were outlined
and the SSA representation was left invalid. The patch adds the exit block to the
cold region.

llvm-svn: 342277
2018-09-14 20:36:19 +00:00

25 lines
673 B
LLVM

; RUN: opt -hotcoldsplit -S < %s | FileCheck %s
; Outlined function is called from a basic block named codeRepl
; CHECK: codeRepl:
; CHECK-NEXT: call void @foo
define void @foo() {
entry:
br i1 undef, label %if.then, label %if.end
if.then: ; preds = %entry
unreachable
if.end: ; preds = %entry
br label %if.then12
if.then12: ; preds = %if.end
br label %cleanup40
cleanup40: ; preds = %if.then12
br label %return
return: ; preds = %cleanup40
ret void
}