Skip to content

Commit ff83497

Browse files
authored
Revert changes to swap_refcnt test. (#3721)
* Revert "Fix swap_refcnt.swift, again..." This reverts commit 2b3c705. This breaks the build. Please use swift-ci. * Revert "SILOptimizer: Fix a broken test" This reverts commit bb9c44f. This breaks the build. Please use swift-ci.
1 parent 72b8813 commit ff83497

File tree

1 file changed

+2
-15
lines changed

1 file changed

+2
-15
lines changed

test/SILOptimizer/swap_refcnt.swift

Lines changed: 2 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,25 +1,12 @@
11
// RUN: %target-swift-frontend -O -emit-sil %s | FileCheck %s
2+
// REQUIRES: rdar:27506150> SILOptimizer/swap_refcnt.swift failes after noreturn -> Never changes
23

34
// Make sure we can swap two values in an array without retaining anything.
45

5-
// FIXME: In optimized builds, we inline some stuff, and end up with
6-
// the following instruction sequence -- %130 is a never-returning
7-
// function:
8-
//
9-
// strong_retain %23 : $Builtin.NativeObject
10-
// strong_retain %23 : $Builtin.NativeObject
11-
// strong_retain %23 : $Builtin.NativeObject
12-
// %130 = apply %121(%125, %114, %118, %120, %126)
13-
//
14-
// But really the strong_retains here should be optimized away.
15-
16-
// XFAIL: optimized_stdlib
17-
18-
196
// CHECK-LABEL: sil @_TF11swap_refcnt11swapByIndex
207
// CHECK-NOT: strong_retain
218
// CHECK-NOT: strong_release
22-
// CHECK: return %
9+
// CHECK: return
2310
public func swapByIndex(A: inout [Int8], x : Int, y : Int) {
2411
swap(&A[x],&A[y])
2512
}

0 commit comments

Comments
 (0)