1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-11-24 19:52:54 +01:00
llvm-mirror/test/Transforms/SimplifyCFG/unreachable-selfloop.ll
Roman Lebedev 3049d557f3 [SimplifyCFG] removeUnreachableBlocks() already knows how to preserve DomTree
... so just ensure that we pass DomTreeUpdater it into it.

Apparently, there were no dedicated tests just for that functionality,
so i'm adding one here.
2020-12-17 01:03:49 +03:00

17 lines
367 B
LLVM

; NOTE: Assertions have been autogenerated by utils/update_test_checks.py
; RUN: opt -simplifycfg -simplifycfg-require-and-preserve-domtree=1 -S < %s | FileCheck %s
define void @fn() {
; CHECK-LABEL: @fn(
; CHECK-NEXT: entry:
; CHECK-NEXT: ret void
;
entry:
ret void
unreachable_bb0:
br label %unreachable_bb1
unreachable_bb1:
br label %unreachable_bb0
}