mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-11-22 18:54:02 +01:00
45cca1d233
Summary: - Skip unreachable predecessors during header detection in SCC. Those unreachable blocks would be generated in the switch lowering pass in the corner cases or other frontends. Even though they could be removed through the CFG simplification, we should skip them during header detection. Reviewers: sameerds Subscribers: hiraditya, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D83562
25 lines
393 B
LLVM
25 lines
393 B
LLVM
; RUN: opt %s -fix-irreducible -S -o - | FileCheck %s
|
|
|
|
; CHECK-LABEL: @unreachable(
|
|
; CHECK: entry:
|
|
; CHECK-NOT: irr.guard:
|
|
define void @unreachable(i32 %n) {
|
|
entry:
|
|
br label %loop.body
|
|
|
|
loop.body:
|
|
br label %inner.block
|
|
|
|
unreachable.block:
|
|
br label %inner.block
|
|
|
|
inner.block:
|
|
br i1 undef, label %loop.exit, label %loop.latch
|
|
|
|
loop.latch:
|
|
br label %loop.body
|
|
|
|
loop.exit:
|
|
ret void
|
|
}
|