@@ -2845,17 +2845,32 @@ bb0(%0 : @owned $Klass):
2845
2845
return %3 : $Builtin.NativeObject
2846
2846
}
2847
2847
2848
- // CHECK-LABEL: sil [ossa] @collapse_existential_pack_unpack_unchecked_ref_cast_owned3 :
2849
- // CHECK-NOT : init_existential_ref
2850
- // CHECK-NOT : open_existential_ref
2851
- // CHECK: } // end sil function 'collapse_existential_pack_unpack_unchecked_ref_cast_owned3 '
2852
- sil [ossa] @collapse_existential_pack_unpack_unchecked_ref_cast_owned3 : $@convention(thin) (@owned Klass) -> @owned Builtin.NativeObject {
2848
+ // CHECK-LABEL: sil [ossa] @collapse_existential_pack_unpack_unchecked_ref_cast_owned3_fail :
2849
+ // CHECK: init_existential_ref
2850
+ // CHECK: open_existential_ref
2851
+ // CHECK: } // end sil function 'collapse_existential_pack_unpack_unchecked_ref_cast_owned3_fail '
2852
+ sil [ossa] @collapse_existential_pack_unpack_unchecked_ref_cast_owned3_fail : $@convention(thin) (@owned Klass) -> @owned Builtin.NativeObject {
2853
2853
bb0(%0 : @owned $Klass):
2854
2854
%1 = init_existential_ref %0 : $Klass : $Klass, $AnyObject
2855
2855
%2 = open_existential_ref %1 : $AnyObject to $@opened("7CAE06CE-5F10-11E4-AF13-C82A1428F987", AnyObject) Self
2856
2856
%f = function_ref @use_generic_obj_guaranteed : $@convention(thin) <τ_0_0> (@guaranteed τ_0_0) -> ()
2857
2857
apply %f<@opened("7CAE06CE-5F10-11E4-AF13-C82A1428F987", AnyObject) Self>(%2) : $@convention(thin) <τ_0_0> (@guaranteed τ_0_0) -> ()
2858
+ %3 = unchecked_ref_cast %2 : $@opened("7CAE06CE-5F10-11E4-AF13-C82A1428F987", AnyObject) Self to $Builtin.NativeObject
2859
+ return %3 : $Builtin.NativeObject
2860
+ }
2858
2861
2862
+ // CHECK-LABEL: sil [ossa] @collapse_existential_pack_unpack_unchecked_ref_cast_owned4_fail :
2863
+ // CHECK: init_existential_ref
2864
+ // CHECK: open_existential_ref
2865
+ // CHECK: } // end sil function 'collapse_existential_pack_unpack_unchecked_ref_cast_owned4_fail'
2866
+ sil [ossa] @collapse_existential_pack_unpack_unchecked_ref_cast_owned4_fail : $@convention(thin) (@owned Klass) -> @owned Builtin.NativeObject {
2867
+ bb0(%0 : @owned $Klass):
2868
+ %1 = init_existential_ref %0 : $Klass : $Klass, $AnyObject
2869
+ %f1 = function_ref @use_anyobject_guaranteed : $@convention(thin) (@guaranteed AnyObject) -> ()
2870
+ apply %f1(%1) : $@convention(thin) (@guaranteed AnyObject) -> ()
2871
+ %2 = open_existential_ref %1 : $AnyObject to $@opened("7CAE06CE-5F10-11E4-AF13-C82A1428F987", AnyObject) Self
2872
+ %f2 = function_ref @use_generic_obj_guaranteed : $@convention(thin) <τ_0_0> (@guaranteed τ_0_0) -> ()
2873
+ apply %f2<@opened("7CAE06CE-5F10-11E4-AF13-C82A1428F987", AnyObject) Self>(%2) : $@convention(thin) <τ_0_0> (@guaranteed τ_0_0) -> ()
2859
2874
%3 = unchecked_ref_cast %2 : $@opened("7CAE06CE-5F10-11E4-AF13-C82A1428F987", AnyObject) Self to $Builtin.NativeObject
2860
2875
return %3 : $Builtin.NativeObject
2861
2876
}
0 commit comments