Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 10 additions & 10 deletions test/SILOptimizer/simplify_cfg_unique_values.sil
Original file line number Diff line number Diff line change
Expand Up @@ -10,17 +10,17 @@ enum DupCaseEnum {
case secondCase
}

// CHECK-LABEL: sil @performSwitch : $@convention(thin) (Int, @thin DupCaseEnum.Type) -> DupCaseEnum {
// CHECK: bb0(%0 : $Int, %1 : $@thin DupCaseEnum.Type):
// CHECK-LABEL: sil @performSwitch : $@convention(thin) (Int64, @thin DupCaseEnum.Type) -> DupCaseEnum {
// CHECK: bb0(%0 : $Int64, %1 : $@thin DupCaseEnum.Type):
// CHECK: select_value
// CHECK: br bb1
// CHECK: bb1:
// CHECK: return
sil @performSwitch : $@convention(thin) (Int, @thin DupCaseEnum.Type) -> DupCaseEnum {
sil @performSwitch : $@convention(thin) (Int64, @thin DupCaseEnum.Type) -> DupCaseEnum {
// %0 // users: %9, %5, %3, %2
bb0(%0 : $Int, %1 : $@thin DupCaseEnum.Type):
bb0(%0 : $Int64, %1 : $@thin DupCaseEnum.Type):
%4 = integer_literal $Builtin.Int64, 0 // user: %6
%5 = struct_extract %0 : $Int, #Int._value // user: %6
%5 = struct_extract %0 : $Int64, #Int64._value // user: %6
%6 = builtin "cmp_eq_Int64"(%4 : $Builtin.Int64, %5 : $Builtin.Int64) : $Builtin.Int1 // users: %10, %7
cond_br %6, bb6, bb1 // id: %7

Expand Down Expand Up @@ -50,16 +50,16 @@ bb7(%18 : $DupCaseEnum): // Preds: bb6 bb5 bb4
return %18 : $DupCaseEnum // id: %19
}

// CHECK-LABEL: sil @performSwitch_bail_out : $@convention(thin) (Int, @thin DupCaseEnum.Type) -> DupCaseEnum {
// CHECK: bb0(%0 : $Int, %1 : $@thin DupCaseEnum.Type):
// CHECK-LABEL: sil @performSwitch_bail_out : $@convention(thin) (Int64, @thin DupCaseEnum.Type) -> DupCaseEnum {
// CHECK: bb0(%0 : $Int64, %1 : $@thin DupCaseEnum.Type):
// CHECK-NOT: select_value
// CHECK-NOT: br bb1
// CHECK: cond_br
sil @performSwitch_bail_out : $@convention(thin) (Int, @thin DupCaseEnum.Type) -> DupCaseEnum {
sil @performSwitch_bail_out : $@convention(thin) (Int64, @thin DupCaseEnum.Type) -> DupCaseEnum {
// %0 // users: %9, %5, %3, %2
bb0(%0 : $Int, %1 : $@thin DupCaseEnum.Type):
bb0(%0 : $Int64, %1 : $@thin DupCaseEnum.Type):
%4 = integer_literal $Builtin.Int64, 0 // user: %6
%5 = struct_extract %0 : $Int, #Int._value // user: %6
%5 = struct_extract %0 : $Int64, #Int64._value // user: %6
%6 = builtin "cmp_eq_Int64"(%4 : $Builtin.Int64, %5 : $Builtin.Int64) : $Builtin.Int1 // users: %10, %7
cond_br %6, bb6, bb1 // id: %7

Expand Down