1 ; RUN: opt -lowerswitch -S < %s | FileCheck %s
3 ; Test that we don't crash and have a different basic block for each incoming edge.
4 define void @test_lower_switch() {
5 ; CHECK-LABEL: @test_lower_switch
6 ; CHECK: %merge = phi i64 [ 1, %BB3 ], [ 0, %NewDefault ], [ 0, %NodeBlock5 ], [ 0, %LeafBlock1 ]
8 switch i32 undef, label %BB2 [
17 %merge = phi i64 [ 1, %BB3 ], [ 0, %BB1 ], [ 0, %BB1 ], [ 0, %BB1 ]