|
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 |
| 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 |
3 | 3 |
|
4 | 4 | // REQUIRES: executable_test
|
5 | 5 | // REQUIRES: objc_interop
|
@@ -140,7 +140,16 @@ if true {
|
140 | 140 |
|
141 | 141 | var bo3 = nonNativeBridgeObject(NSNumber(value: 22))
|
142 | 142 | print(Bool(_builtinBooleanLiteral: Builtin.isUnique(&bo3)))
|
143 |
| - // CHECK-NEXT: false |
| 143 | + // On 64-bit*, this will be an objc tagged pointer. On 32-bit, there are no |
| 144 | + // objc tagged pointers. If it's an objc tagged pointer, it will never be |
| 145 | + // unique. Otherwise, it will be unique--subject to any intering of NSNumbers |
| 146 | + // that Foundation does. |
| 147 | + // * Whether it's a tagged pointer doesn't actually depend on bit width--see |
| 148 | + // OBJC_TAGGED_POINTER_BITS for the various architectures at the top of the |
| 149 | + // file. If those other architectures ever start being used in CI, this |
| 150 | + // test will need more involved updating. |
| 151 | + // CHECK-32-NEXT: true |
| 152 | + // CHECK-64-NEXT: false |
144 | 153 | _fixLifetime(bo3)
|
145 | 154 | }
|
146 | 155 |
|
|
0 commit comments