1 ; RUN: opt < %s -simplifycfg -S | FileCheck %s
3 ; int foo1_with_default(int a) {
13 define i32 @foo1_with_default(i32 %a) {
14 ; CHECK-LABEL: @foo1_with_default(
16 ; CHECK-NEXT: [[SWITCH_SELECTCMP:%.*]] = icmp eq i32 %a, 20
17 ; CHECK-NEXT: [[SWITCH_SELECT:%.*]] = select i1 [[SWITCH_SELECTCMP:%.*]], i32 2, i32 4
18 ; CHECK-NEXT: [[SWITCH_SELECTCMP1:%.*]] = icmp eq i32 %a, 10
19 ; CHECK-NEXT: [[SWITCH_SELECT2:%.*]] = select i1 [[SWITCH_SELECTCMP1]], i32 10, i32 [[SWITCH_SELECT]]
20 ; CHECK-NEXT: ret i32 [[SWITCH_SELECT2]]
23 switch i32 %a, label %sw.epilog [
38 %retval.0 = phi i32 [ 4, %sw.epilog ], [ 2, %sw.bb1 ], [ 10, %sw.bb ]