Skip to content

Commit 257e1d3

Browse files
committed
[Test] Reenabled SILOpt/shrink_borrow_scope.
LexicalDestroyFolding allows us to elide the spurious retain/release that was being tested here. rdar://87255563
1 parent 9e5e935 commit 257e1d3

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

test/SILOptimizer/shrink_borrow_scope.swift

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,5 @@
11
// RUN: %target-swift-frontend -c -O -enable-copy-propagation=true -enable-lexical-lifetimes=true -sil-verify-all -Xllvm -sil-print-final-ossa-module %s | %FileCheck %s
22

3-
// REQUIRES: rdar87255563
4-
53
// =============================================================================
64
// = DECLARATIONS {{
75
// =============================================================================
@@ -26,9 +24,10 @@ public func eliminate_copy_of_returned_then_consumed_owned_value(arg: __owned An
2624
// CHECK: [[ARG_COPY:%[^,]+]] = copy_value [[ARG_LIFETIME]]
2725
let x = consumeAndProduce(arg)
2826
// CHECK: [[X:%[^,]+]] = apply {{%[^,]+}}([[ARG_COPY]])
27+
// CHECK: [[MOVE_X:%[^,]+]] = move_value [lexical] [[X]]
2928
// no copy of 'x'
3029
_ = consumeAndProduce(x)
31-
// CHECK: [[RESULT:%[^,]+]] = apply {{%[^,]+}}([[X]])
30+
// CHECK: [[RESULT:%[^,]+]] = apply {{%[^,]+}}([[MOVE_X]])
3231
// CHECK: end_borrow [[ARG_LIFETIME]]
3332
// release result
3433
// release arg

0 commit comments

Comments
 (0)