llvm-mirror/test/Transforms/SimplifyCFG/BrUnwind.ll
Roman Lebedev 39a69897ce [NFCI][SimplifyCFG] Guard common code hoisting with a (default-on) flag
Common code sinking is already guarded with a (with default-off!) flag,
so add a flag for hoisting, too.

D84108 will hopefully make hoisting off-by-default too.
2020-07-20 10:29:57 +03:00

16 lines
370 B
LLVM

; RUN: opt < %s -simplifycfg -hoist-common-insts=true -S | \
; RUN: not grep "br label"
define void @test(i1 %C) {
br i1 %C, label %A, label %B
A: ; preds = %0
call void @test( i1 %C )
br label %X
B: ; preds = %0
call void @test( i1 %C )
br label %X
X: ; preds = %B, %A
ret void
}