1 ; RUN: opt -S -passes=lower-switch %s | FileCheck %s
3 ; CHECK-LABEL: @phi_in_dead_block(
5 define void @phi_in_dead_block(i1 %arg) {
7 br i1 %arg, label %bb2, label %bb3
9 bb1: ; No predecessors!
10 switch i32 undef, label %bb2 [
14 bb2: ; preds = %bb1, %bb
15 %tmp = phi i64 [ undef, %bb1 ], [ undef, %bb ]
18 bb3: ; preds = %bb1, %bb
22 ; CHECK-LABEL: @phi_in_dead_block_br_to_self(
24 define void @phi_in_dead_block_br_to_self(i1 %arg) {
26 br i1 %arg, label %bb2, label %bb3
28 bb1: ; No predecessors!
29 switch i32 undef, label %bb2 [
34 bb2: ; preds = %bb1, %bb
35 %tmp = phi i64 [ undef, %bb1 ], [ undef, %bb ]
38 bb3: ; preds = %bb1, %bb