Imported Upstream version 5.18.0.205

Former-commit-id: 7f59f7e792705db773f1caecdaa823092f4e2927
This commit is contained in:
Xamarin Public Jenkins (auto-signing)
2018-11-16 08:20:38 +00:00
parent 5cd5df71cc
commit 8e12397d70
28486 changed files with 3867013 additions and 66 deletions

View File

@ -0,0 +1,40 @@
; RUN: opt -S -lowerswitch %s | FileCheck %s
; CHECK-LABEL: @phi_in_dead_block(
; CHECK-NOT: switch
define void @phi_in_dead_block() {
bb:
br i1 undef, label %bb2, label %bb3
bb1: ; No predecessors!
switch i32 undef, label %bb2 [
i32 9, label %bb3
]
bb2: ; preds = %bb1, %bb
%tmp = phi i64 [ undef, %bb1 ], [ undef, %bb ]
unreachable
bb3: ; preds = %bb1, %bb
unreachable
}
; CHECK-LABEL: @phi_in_dead_block_br_to_self(
; CHECK-NOT: switch
define void @phi_in_dead_block_br_to_self() {
bb:
br i1 undef, label %bb2, label %bb3
bb1: ; No predecessors!
switch i32 undef, label %bb2 [
i32 9, label %bb3
i32 10, label %bb1
]
bb2: ; preds = %bb1, %bb
%tmp = phi i64 [ undef, %bb1 ], [ undef, %bb ]
unreachable
bb3: ; preds = %bb1, %bb
unreachable
}