Files
archived-llvm/test/Transforms/HotColdSplit/split-cold-2.ll
Sebastian Pop 0c636310ae 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.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@342277 91177308-0d34-0410-b5e6-96231b3b80d8
2018-09-14 20:36:19 +00:00

29 lines
526 B
LLVM

; RUN: opt -hotcoldsplit -S < %s
; Make sure this compiles. This test used to fail with an invalid phi node: the
; two predecessors were outlined and the SSA representation was invalid.
define void @fun() {
entry:
br i1 undef, label %if.then, label %if.else
if.then:
unreachable
if.else:
br label %if.then4
if.then4:
br i1 undef, label %if.then5, label %if.end
if.then5:
br label %cleanup
if.end:
br label %cleanup
cleanup:
%cleanup.dest.slot.0 = phi i32 [ 1, %if.then5 ], [ 0, %if.end ]
unreachable
}