Skip to content

Commit 5af1ab0

Browse files
committed
Update some allocbox to stack tests given I removed early allocbox to stack.
(cherry picked from commit 0b38bba)
1 parent de54385 commit 5af1ab0

File tree

3 files changed

+1
-12
lines changed

3 files changed

+1
-12
lines changed

test/SILOptimizer/allocbox_to_stack_noncopyable.sil

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
// RUN: %target-sil-opt -enable-sil-verify-all %s -allocbox-to-stack -enable-copy-propagation=requested-passes-only | %FileCheck %s
2-
// RUN: %target-sil-opt -enable-sil-verify-all %s -early-allocbox-to-stack -enable-copy-propagation=requested-passes-only | %FileCheck -check-prefix=EARLY %s
32

43
sil_stage raw
54

@@ -162,13 +161,6 @@ bb3:
162161
return %30 : $()
163162
}
164163

165-
// Make sure that if our box is captured by a partial_apply, we do not process
166-
// it with the early allocbox to stack, but we do with the normal allocbox to
167-
// stack.
168-
// EARLY: sil hidden [ossa] @earlyallocbox_to_stack_partial_apply_test_caller : $@convention(thin) (@owned NonTrivialStruct) -> () {
169-
// EARLY: alloc_box ${ var NonTrivialStruct }, var, name "x"
170-
// EARLY: } // end sil function 'earlyallocbox_to_stack_partial_apply_test_caller'
171-
//
172164
// CHECK: sil hidden [ossa] @earlyallocbox_to_stack_partial_apply_test_caller : $@convention(thin) (@owned NonTrivialStruct) -> () {
173165
// CHECK: alloc_stack [lexical] $NonTrivialStruct, var, name "x"
174166
// CHECK: } // end sil function 'earlyallocbox_to_stack_partial_apply_test_caller'
@@ -200,4 +192,4 @@ bb0(%0 : @closureCapture @guaranteed ${ var NonTrivialStruct }):
200192
destroy_value %7 : $NonTrivialStruct
201193
%9 = tuple ()
202194
return %9 : $()
203-
}
195+
}

test/SILOptimizer/allocbox_to_stack_ownership.sil

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
// RUN: %target-sil-opt -enable-sil-verify-all %s -allocbox-to-stack -enable-copy-propagation=requested-passes-only -enable-lexical-borrow-scopes=false | %FileCheck %s
2-
// RUN: %target-sil-opt -enable-sil-verify-all %s -early-allocbox-to-stack -enable-copy-propagation=requested-passes-only -enable-lexical-borrow-scopes=false | %FileCheck %s
32

43
sil_stage raw
54

test/SILOptimizer/allocboxtostack_escape.swift

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,7 @@ func testError() -> (() -> ()) {
1212
// We emit this error twice since we run allocbox to stack twice in the pipeline for now. This is not an official feature, so it is ok for now.
1313
@_semantics("boxtostack.mustbeonstack")
1414
var x = Box<Klass>(value: Klass()) // expected-error {{Can not promote value from heap to stack due to value escaping}}
15-
// expected-error @-1 {{Can not promote value from heap to stack due to value escaping}}
1615
let result = { // expected-note {{value escapes here}}
17-
// expected-note @-1 {{value escapes here}}
1816
myPrint(&x)
1917
}
2018
return result

0 commit comments

Comments
 (0)