Skip to content

Commit d97c6ef

Browse files
Merge pull request #72836 from nate-chandler/rdar125628293
[Test] Fix uniqueness check line for 32 bit.
2 parents a263bca + 548adb9 commit d97c6ef

File tree

1 file changed

+12
-6
lines changed

1 file changed

+12
-6
lines changed

test/Interpreter/builtin_bridge_object.swift

Lines changed: 12 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,5 @@
1-
// RUN: %target-run-simple-swift(-Onone -parse-stdlib -Xfrontend -enable-copy-propagation -target %target-swift-abi-5.6-triple) | %FileCheck %s --check-prefixes=CHECK,CHECK-DBG
2-
// RUN: %target-run-simple-swift(-O -parse-stdlib -Xfrontend -enable-copy-propagation -target %target-swift-abi-5.6-triple) | %FileCheck --check-prefixes=CHECK,CHECK-OPT %s
3-
4-
// rdar://125628293
5-
// UNSUPPORTED: CPU=arm64_32
1+
// RUN: %target-run-simple-swift(-Onone -parse-stdlib -Xfrontend -enable-copy-propagation -target %target-swift-abi-5.6-triple) | %FileCheck %s --check-prefixes=CHECK,CHECK-DBG,CHECK-%target-ptrsize
2+
// RUN: %target-run-simple-swift(-O -parse-stdlib -Xfrontend -enable-copy-propagation -target %target-swift-abi-5.6-triple) | %FileCheck %s --check-prefixes=CHECK,CHECK-OPT,CHECK-%target-ptrsize
63

74
// REQUIRES: executable_test
85
// REQUIRES: objc_interop
@@ -141,7 +138,16 @@ if true {
141138

142139
var bo3 = nonNativeBridgeObject(NSNumber(value: 22))
143140
print(Bool(_builtinBooleanLiteral: Builtin.isUnique(&bo3)))
144-
// CHECK-NEXT: false
141+
// On 64-bit*, this will be an objc tagged pointer. On 32-bit, there are no
142+
// objc tagged pointers. If it's an objc tagged pointer, it will never be
143+
// unique. Otherwise, it will be unique--subject to any intering of NSNumbers
144+
// that Foundation does.
145+
// * Whether it's a tagged pointer doesn't actually depend on bit width--see
146+
// OBJC_TAGGED_POINTER_BITS for the various architectures at the top of the
147+
// file. If those other architectures ever start being used in CI, this
148+
// test will need more involved updating.
149+
// CHECK-32-NEXT: true
150+
// CHECK-64-NEXT: false
145151
_fixLifetime(bo3)
146152
}
147153

0 commit comments

Comments
 (0)