Skip to content

Commit 7c1b582

Browse files
committed
Update MutableSpan bounds check tests
1 parent a9f376a commit 7c1b582

File tree

1 file changed

+5
-11
lines changed

1 file changed

+5
-11
lines changed

test/SILOptimizer/mutable_span_bounds_check_tests.swift

Lines changed: 5 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -57,14 +57,12 @@ public func mutable_span_sum_wo_trap_unknown_bound(_ ms: borrowing MutableSpan<I
5757

5858
// CHECK-SIL-LABEL: sil @$s31mutable_span_bounds_check_tests0B10_zero_inityys11MutableSpanVySiGzF :
5959
// CHECK-SIL: bb3({{.*}}):
60-
// CHECK-SIL: cond_fail {{.*}}, "index out of bounds"
6160
// CHECK-SIL-NOT: cond_fail {{.*}}, "index out of bounds"
6261
// CHECK-SIL: cond_br
6362
// CHECK-SIL-LABEL: } // end sil function '$s31mutable_span_bounds_check_tests0B10_zero_inityys11MutableSpanVySiGzF'
6463

6564
// CHECK-IR: define {{.*}} void @"$s31mutable_span_bounds_check_tests0B10_zero_inityys11MutableSpanVySiGzF"
66-
// CHECK-IR: vector.body
67-
// CHECK-IR: store <{{.*}}> zeroinitializer,
65+
// CHECK-IR: call void @llvm.memset
6866
public func span_zero_init(_ output: inout MutableSpan<Int>) {
6967
for i in output.indices {
7068
output[i] = 0
@@ -73,7 +71,6 @@ public func span_zero_init(_ output: inout MutableSpan<Int>) {
7371

7472
// CHECK-SIL-LABEL: sil @$s31mutable_span_bounds_check_tests0B14_copy_elemwiseyys11MutableSpanVySiGz_s0I0VySiGtF :
7573
// CHECK-SIL: bb3({{.*}}):
76-
// CHECK-SIL: cond_fail {{.*}}, "index out of bounds"
7774
// CHECK-SIL-NOT: cond_fail {{.*}}, "index out of bounds"
7875
// CHECK-SIL: cond_br
7976
// CHECK-SIL-LABEL: } // end sil function '$s31mutable_span_bounds_check_tests0B14_copy_elemwiseyys11MutableSpanVySiGz_s0I0VySiGtF'
@@ -90,10 +87,9 @@ public func span_copy_elemwise(_ output: inout MutableSpan<Int>, _ input: Span<I
9087
}
9188

9289
// CHECK-SIL-LABEL: sil @$s31mutable_span_bounds_check_tests0B16_append_elemwiseyys10OutputSpanVySiGz_s0I0VySiGtF :
93-
// FIX-CHECK-SIL: bb3({{.*}}):
94-
// FIX-CHECK-SIL: cond_fail {{.*}}, "index out of bounds"
95-
// FIX-CHECK-SIL-NOT: cond_fail {{.*}}, "index out of bounds"
96-
// FIX-CHECK-SIL: cond_br
90+
// CHECK-SIL: bb3({{.*}}):
91+
// CHECK-SIL-NOT: cond_fail {{.*}}, "index out of bounds"
92+
// CHECK-SIL: cond_br
9793
// CHECK-SIL-LABEL: } // end sil function '$s31mutable_span_bounds_check_tests0B16_append_elemwiseyys10OutputSpanVySiGz_s0I0VySiGtF'
9894

9995
// CHECK-IR: define {{.*}} void @"$s31mutable_span_bounds_check_tests0B16_append_elemwiseyys10OutputSpanVySiGz_s0I0VySiGtF"
@@ -108,7 +104,6 @@ public func span_append_elemwise(_ output: inout OutputSpan<Int>, _ input: Span<
108104

109105
// CHECK-SIL-LABEL: sil @$s31mutable_span_bounds_check_tests0B12_sum_wo_trapyys11MutableSpanVySiGz_s0J0VySiGAHtF :
110106
// CHECK-SIL: bb3({{.*}}):
111-
// CHECK-SIL: cond_fail {{.*}}, "index out of bounds"
112107
// CHECK-SIL-NOT: cond_fail {{.*}}, "index out of bounds"
113108
// CHECK-SIL: cond_br
114109
// CHECK-SIL-LABEL: } // end sil function '$s31mutable_span_bounds_check_tests0B12_sum_wo_trapyys11MutableSpanVySiGz_s0J0VySiGAHtF'
@@ -127,7 +122,6 @@ public func span_sum_wo_trap(_ output: inout MutableSpan<Int>, _ input1: Span<In
127122

128123
// CHECK-SIL-LABEL: sil @$s31mutable_span_bounds_check_tests0B14_sum_with_trapyys11MutableSpanVySiGz_s0J0VySiGAHtF :
129124
// CHECK-SIL: bb3({{.*}}):
130-
// CHECK-SIL: cond_fail {{.*}}, "index out of bounds"
131125
// CHECK-SIL-NOT: cond_fail {{.*}}, "index out of bounds"
132126
// CHECK-SIL: cond_br
133127
// CHECK-SIL-LABEL: } // end sil function '$s31mutable_span_bounds_check_tests0B14_sum_with_trapyys11MutableSpanVySiGz_s0J0VySiGAHtF'
@@ -142,7 +136,7 @@ public func span_sum_with_trap(_ output: inout MutableSpan<Int>, _ input1: Span<
142136

143137
// CHECK-SIL-LABEL: sil @$s31mutable_span_bounds_check_tests0B12_bubble_sortyys11MutableSpanVySiGzF :
144138
// CHECK-SIL: bb12{{.*}}:
145-
// CHECK-SIL-NOT: cond_fail {{.*}}, "index out of bounds"
139+
// TODO-CHECK-SIL-NOT: cond_fail {{.*}}, "index out of bounds"
146140
// CHECK-SIL-LABEL: } // end sil function '$s31mutable_span_bounds_check_tests0B12_bubble_sortyys11MutableSpanVySiGzF'
147141
public func span_bubble_sort(_ span: inout MutableSpan<Int>) {
148142
if span.count <= 1 {

0 commit comments

Comments
 (0)