@@ -147,11 +147,11 @@ bb0(%0 : $*G<T>):
147
147
}
148
148
149
149
// CHECK-LABEL: sil [ossa] @canonicalize_init_enum_data_addr
150
- // XHECK -NOT: init_enum_data_addr
151
- // XHECK -NOT: inject_enum_addr
152
- // XHECK : enum $Optional<Int32>, #Optional.some!enumelt
153
- // XHECK -NOT: inject_enum_addr
154
- // XHECK : return
150
+ // CHECK -NOT: init_enum_data_addr
151
+ // CHECK -NOT: inject_enum_addr
152
+ // CHECK : enum $Optional<Int32>, #Optional.some!enumelt
153
+ // CHECK -NOT: inject_enum_addr
154
+ // CHECK : return
155
155
sil [ossa] @canonicalize_init_enum_data_addr : $@convention(thin) (@inout Int32, Builtin.Int32, Optional<Int32>) -> Int32 {
156
156
bb0(%0 : $*Int32, %1 : $Builtin.Int32, %2 : $Optional<Int32>):
157
157
%s1 = alloc_stack $Optional<Int32>
@@ -171,11 +171,11 @@ bb0(%0 : $*Int32, %1 : $Builtin.Int32, %2 : $Optional<Int32>):
171
171
}
172
172
173
173
// CHECK-LABEL: sil [ossa] @canonicalize_init_enum_data_addr
174
- // XHECK -NOT: init_enum_data_addr
175
- // XHECK -NOT: inject_enum_addr
176
- // XHECK : enum $Optional<SomeClass>, #Optional.some!enumelt
177
- // XHECK -NOT: inject_enum_addr
178
- // XHECK : return
174
+ // CHECK -NOT: init_enum_data_addr
175
+ // CHECK -NOT: inject_enum_addr
176
+ // CHECK : enum $Optional<SomeClass>, #Optional.some!enumelt
177
+ // CHECK -NOT: inject_enum_addr
178
+ // CHECK : return
179
179
sil [ossa] @canonicalize_init_enum_data_addr_non_trivial : $@convention(thin) (@inout SomeClass, @owned Optional<SomeClass>) -> @owned Optional<SomeClass> {
180
180
bb0(%0 : $*SomeClass, %2 : @owned $Optional<SomeClass>):
181
181
%s1 = alloc_stack $Optional<SomeClass>
@@ -194,11 +194,11 @@ bb0(%0 : $*SomeClass, %2 : @owned $Optional<SomeClass>):
194
194
}
195
195
196
196
// CHECK-LABEL: sil [ossa] @canonicalize_init_enum_data_addr_diff_basic_blocks
197
- // XHECK -NOT: init_enum_data_addr
198
- // XHECK -NOT: inject_enum_addr
199
- // XHECK : enum $Optional<Int32>, #Optional.some!enumelt
200
- // XHECK -NOT: inject_enum_addr
201
- // XHECK : return
197
+ // CHECK -NOT: init_enum_data_addr
198
+ // CHECK -NOT: inject_enum_addr
199
+ // CHECK : enum $Optional<Int32>, #Optional.some!enumelt
200
+ // CHECK -NOT: inject_enum_addr
201
+ // CHECK : return
202
202
sil [ossa] @canonicalize_init_enum_data_addr_diff_basic_blocks : $@convention(thin) (@inout Int32, Builtin.Int32, Optional<Int32>) -> Int32 {
203
203
bb0(%0 : $*Int32, %1 : $Builtin.Int32, %2 : $Optional<Int32>):
204
204
%s1 = alloc_stack $Optional<Int32>
@@ -221,10 +221,10 @@ bb1: // Preds: bb0
221
221
}
222
222
223
223
// CHECK-LABEL: sil [ossa] @fail_to_canonicalize_init_enum_data_addr_reach_entry
224
- // XHECK : init_enum_data_addr
225
- // XHECK : inject_enum_addr
226
- // XHECK -NOT: enum $Optional<Int32>, #Optional.some!enumelt
227
- // XHECK : return
224
+ // CHECK : init_enum_data_addr
225
+ // CHECK : inject_enum_addr
226
+ // CHECK -NOT: enum $Optional<Int32>, #Optional.some!enumelt
227
+ // CHECK : return
228
228
sil [ossa] @fail_to_canonicalize_init_enum_data_addr_reach_entry : $@convention(thin) (@inout Int32, Builtin.Int32, Builtin.Int1) -> Int32 {
229
229
bb0(%0 : $*Int32, %1 : $Builtin.Int32, %2 : $Builtin.Int1):
230
230
%s1 = alloc_stack $Optional<Int32>
@@ -255,10 +255,10 @@ bb2: // Preds: bb0 bb1
255
255
}
256
256
257
257
// CHECK-LABEL: sil [ossa] @fail_to_canonicalize_init_enum_data_addr
258
- // XHECK : init_enum_data_addr
259
- // XHECK : inject_enum_addr
260
- // XHECK -NOT: enum $Optional<Int32>, #Optional.some!enumelt
261
- // XHECK : return
258
+ // CHECK : init_enum_data_addr
259
+ // CHECK : inject_enum_addr
260
+ // CHECK -NOT: enum $Optional<Int32>, #Optional.some!enumelt
261
+ // CHECK : return
262
262
sil [ossa] @fail_to_canonicalize_init_enum_data_addr : $@convention(thin) (@inout Int32, Builtin.Int32) -> Int32 {
263
263
bb0(%0 : $*Int32, %1 : $Builtin.Int32):
264
264
%s1 = alloc_stack $Optional<Int32>
@@ -455,13 +455,13 @@ bb3(%14 : @owned $C):
455
455
}
456
456
457
457
// CHECK-LABEL: sil [ossa] @test_inject_tuple
458
- // XHECK : [[A:%[0-9]+]] = alloc_stack $Optional<(Int, Int)>
459
- // XHECK : [[T:%[0-9]+]] = tuple (%0 : $Int, %1 : $Int)
460
- // XHECK : [[E:%[0-9]+]] = enum $Optional<(Int, Int)>, #Optional.some!enumelt, [[T]] : $(Int, Int)
461
- // XHECK : store [[E]] to [trivial] [[A]]
462
- // XHECK : [[L:%[0-9]+]] = load [trivial] [[A]]
463
- // XHECK : return [[L]]
464
- // XHECK : } // end sil function 'test_inject_tuple'
458
+ // CHECK : [[A:%[0-9]+]] = alloc_stack $Optional<(Int, Int)>
459
+ // CHECK : [[T:%[0-9]+]] = tuple (%0 : $Int, %1 : $Int)
460
+ // CHECK : [[E:%[0-9]+]] = enum $Optional<(Int, Int)>, #Optional.some!enumelt, [[T]] : $(Int, Int)
461
+ // CHECK : store [[E]] to [trivial] [[A]]
462
+ // CHECK : [[L:%[0-9]+]] = load [trivial] [[A]]
463
+ // CHECK : return [[L]]
464
+ // CHECK : } // end sil function 'test_inject_tuple'
465
465
sil [ossa] @test_inject_tuple : $@convention(thin) (Int, Int) -> Optional<(Int, Int)> {
466
466
bb0(%0 : $Int, %1 : $Int):
467
467
%17 = alloc_stack $Optional<(Int, Int)>
@@ -486,14 +486,14 @@ sil [ossa] @take_t : $@convention(thin) (@in T) -> ()
486
486
sil [ossa] @use_mp : $@convention(thin) (@in_guaranteed MP) -> ()
487
487
488
488
// CHECK-LABEL: sil [ossa] @expand_alloc_stack_of_enum1
489
- // XHECK : [[A:%[0-9]+]] = alloc_stack $S
490
- // XHECK : bb1:
491
- // XHECK -NEXT: store %0 to [trivial] [[A]]
492
- // XHECK : bb2:
493
- // XHECK -NEXT: store %0 to [trivial] [[A]]
494
- // XHECK : bb3:
495
- // XHECK : apply {{%[0-9]+}}([[A]])
496
- // XHECK : } // end sil function 'expand_alloc_stack_of_enum1'
489
+ // CHECK : [[A:%[0-9]+]] = alloc_stack $S
490
+ // CHECK : bb1:
491
+ // CHECK -NEXT: store %0 to [trivial] [[A]]
492
+ // CHECK : bb2:
493
+ // CHECK -NEXT: store %0 to [trivial] [[A]]
494
+ // CHECK : bb3:
495
+ // CHECK : apply {{%[0-9]+}}([[A]])
496
+ // CHECK : } // end sil function 'expand_alloc_stack_of_enum1'
497
497
sil [ossa] @expand_alloc_stack_of_enum1 : $@convention(method) (S) -> () {
498
498
bb0(%0 : $S):
499
499
%1 = alloc_stack $MP
@@ -521,14 +521,14 @@ bb3:
521
521
}
522
522
523
523
// CHECK-LABEL: sil [ossa] @expand_alloc_stack_of_enum_without_take
524
- // XHECK : [[A:%[0-9]+]] = alloc_stack $S
525
- // XHECK : bb1:
526
- // XHECK -NEXT: store %0 to [trivial] [[A]]
527
- // XHECK : bb2:
528
- // XHECK -NEXT: store %0 to [trivial] [[A]]
529
- // XHECK : bb3:
530
- // XHECK : destroy_addr [[A]]
531
- // XHECK : } // end sil function 'expand_alloc_stack_of_enum_without_take'
524
+ // CHECK : [[A:%[0-9]+]] = alloc_stack $S
525
+ // CHECK : bb1:
526
+ // CHECK -NEXT: store %0 to [trivial] [[A]]
527
+ // CHECK : bb2:
528
+ // CHECK -NEXT: store %0 to [trivial] [[A]]
529
+ // CHECK : bb3:
530
+ // CHECK : destroy_addr [[A]]
531
+ // CHECK : } // end sil function 'expand_alloc_stack_of_enum_without_take'
532
532
sil [ossa] @expand_alloc_stack_of_enum_without_take : $@convention(method) (S) -> () {
533
533
bb0(%0 : $S):
534
534
%1 = alloc_stack $MP
@@ -554,15 +554,15 @@ bb3:
554
554
}
555
555
556
556
// CHECK-LABEL: sil [ossa] @expand_alloc_stack_of_enum_multiple_cases
557
- // XHECK : [[A:%[0-9]+]] = alloc_stack $T
558
- // XHECK : bb1:
559
- // XHECK -NEXT: [[COPY_ARG:%.*]] = copy_value %0
560
- // XHECK -NEXT: store [[COPY_ARG]] to [init] [[A]]
561
- // XHECK : apply {{%[0-9]+}}([[A]])
562
- // XHECK : bb2:
563
- // XHECK -NEXT: br bb3
564
- // XHECK : bb3:
565
- // XHECK : } // end sil function 'expand_alloc_stack_of_enum_multiple_cases'
557
+ // CHECK : [[A:%[0-9]+]] = alloc_stack $T
558
+ // CHECK : bb1:
559
+ // CHECK -NEXT: [[COPY_ARG:%.*]] = copy_value %0
560
+ // CHECK -NEXT: store [[COPY_ARG]] to [init] [[A]]
561
+ // CHECK : apply {{%[0-9]+}}([[A]])
562
+ // CHECK : bb2:
563
+ // CHECK -NEXT: br bb3
564
+ // CHECK : bb3:
565
+ // CHECK : } // end sil function 'expand_alloc_stack_of_enum_multiple_cases'
566
566
sil [ossa] @expand_alloc_stack_of_enum_multiple_cases : $@convention(method) (@guaranteed T) -> () {
567
567
bb0(%0 : @guaranteed $T):
568
568
%1 = alloc_stack $X
590
590
}
591
591
592
592
// CHECK-LABEL: sil [ossa] @dont_expand_alloc_stack_of_enum_multiple_cases
593
- // XHECK : alloc_stack $MP
594
- // XHECK : } // end sil function 'dont_expand_alloc_stack_of_enum_multiple_cases'
593
+ // CHECK : alloc_stack $MP
594
+ // CHECK : } // end sil function 'dont_expand_alloc_stack_of_enum_multiple_cases'
595
595
sil [ossa] @dont_expand_alloc_stack_of_enum_multiple_cases : $@convention(method) (S) -> () {
596
596
bb0(%0 : $S):
597
597
%1 = alloc_stack $MP
617
617
}
618
618
619
619
// CHECK-LABEL: sil [ossa] @dont_expand_alloc_stack_of_enum_multiple_cases2
620
- // XHECK : alloc_stack $X
621
- // XHECK : } // end sil function 'dont_expand_alloc_stack_of_enum_multiple_cases2'
620
+ // CHECK : alloc_stack $X
621
+ // CHECK : } // end sil function 'dont_expand_alloc_stack_of_enum_multiple_cases2'
622
622
sil [ossa] @dont_expand_alloc_stack_of_enum_multiple_cases2 : $@convention(method) (@guaranteed T) -> () {
623
623
bb0(%0 : @guaranteed $T):
624
624
%1 = alloc_stack $X
643
643
}
644
644
645
645
// CHECK-LABEL: sil [ossa] @dont_expand_alloc_stack_of_enum_unknown_use
646
- // XHECK : alloc_stack $MP
647
- // XHECK : } // end sil function 'dont_expand_alloc_stack_of_enum_unknown_use'
646
+ // CHECK : alloc_stack $MP
647
+ // CHECK : } // end sil function 'dont_expand_alloc_stack_of_enum_unknown_use'
648
648
sil [ossa] @dont_expand_alloc_stack_of_enum_unknown_use : $@convention(method) (S) -> () {
649
649
bb0(%0 : $S):
650
650
%1 = alloc_stack $MP
0 commit comments