@@ -162,9 +162,9 @@ exit(%phi : @owned $C, %typhi : $S):
162
162
sil @empty : $@convention(thin) () -> () {
163
163
[global: ]
164
164
bb0:
165
- %0 = tuple ()
166
- return %0 : $()
167
- }
165
+ %0 = tuple ()
166
+ return %0 : $()
167
+ }
168
168
169
169
// Even though the apply of %empty is not a deinit barrier, verify that the
170
170
// destroy is not hoisted, because MoS is move-only.
@@ -568,16 +568,16 @@ entry(%c1 : @owned $C):
568
568
// CHECK: bb0([[C1:%[^,]+]] : @owned $C):
569
569
// CHECK: [[TAKE_C:%[^,]+]] = function_ref @takeC
570
570
// CHECK: [[BARRIER:%[^,]+]] = function_ref @barrier
571
- // CHECK: cond_br undef, [[LEFT]], [[RIGHT]]
572
- // CHECK: [[LEFT]]:
571
+ // CHECK: cond_br undef, [[LEFT]], [[RIGHT]]
572
+ // CHECK: [[LEFT]]:
573
573
// CHECK: [[M:%[^,]+]] = move_value [[C1]]
574
574
// CHECK: apply [[TAKE_C]]([[M]])
575
- // CHECK: br [[EXIT]]
576
- // CHECK: [[RIGHT]]:
575
+ // CHECK: br [[EXIT]]
576
+ // CHECK: [[RIGHT]]:
577
577
// CHECK: apply [[BARRIER]]()
578
578
// CHECK: destroy_value [[C1]]
579
- // CHECK: br [[EXIT]]
580
- // CHECK: [[EXIT]]:
579
+ // CHECK: br [[EXIT]]
580
+ // CHECK: [[EXIT]]:
581
581
// CHECK: apply [[BARRIER]]()
582
582
// CHECK-LABEL: } // end sil function 'lexical_end_at_end_2'
583
583
// CHECK-LABEL: end running test {{.*}} on lexical_end_at_end_2: canonicalize_ossa_lifetime
@@ -858,6 +858,7 @@ exit:
858
858
return %retval : $()
859
859
}
860
860
861
+
861
862
// CHECK-LABEL: begin running test {{.*}} on consume_copy_before_use_in_dead_end
862
863
// CHECK-LABEL: sil [ossa] @consume_copy_before_use_in_dead_end : {{.*}} {
863
864
// CHECK-NOT: destroy_value [dead_end]
@@ -868,19 +869,19 @@ entry(%c : @owned $C):
868
869
cond_br undef, exit, die
869
870
870
871
exit:
871
- destroy_value %c
872
+ destroy_value %c : $C
872
873
%retval = tuple ()
873
- return %retval
874
+ return %retval : $()
874
875
875
876
die:
876
- %move = move_value [lexical] %c
877
- %copy = copy_value %move
877
+ %move = move_value [lexical] %c : $C
878
+ %copy = copy_value %move : $C
878
879
specify_test "canonicalize_ossa_lifetime true false true %move"
879
880
apply undef(%move) : $@convention(thin) (@owned C) -> ()
880
881
%addr = alloc_stack $C
881
- %token = store_borrow %copy to %addr
882
+ %token = store_borrow %copy to %addr : $*C
882
883
apply undef() : $@convention(thin) () -> ()
883
- %reload = load_borrow %token
884
+ %reload = load_borrow %token : $*C
884
885
apply undef(%reload) : $@convention(thin) (@guaranteed C) -> ()
885
886
unreachable
886
887
}
0 commit comments