Skip to content

Commit 72dd2fe

Browse files
committed
tests: adapt the character_literals test
and re-enable it https://bugs.swift.org/browse/SR-5064
1 parent 5de07a6 commit 72dd2fe

File tree

1 file changed

+5
-15
lines changed

1 file changed

+5
-15
lines changed
Lines changed: 5 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,35 +1,25 @@
11
// RUN: %target-swift-frontend -parse-as-library -O -emit-ir %s | %FileCheck %s
22
// REQUIRES: swift_stdlib_no_asserts,optimized_stdlib,CPU=x86_64
33

4-
// see https://bugs.swift.org/browse/SR-5064, rdar://32511377
5-
// XFAIL: *
6-
74
// This is an end-to-end test to ensure that the optimizer generates
85
// a simple literal for character literals.
96

107
// CHECK-LABEL: define {{.*}}charArray
11-
// CHECK-NOT: {{^}}[^ ]
12-
// CHECK: store i64 9223372036854775649, i64*
13-
// CHECK-NOT: {{^}}[^ ]
14-
// CHECK: store i64 9223372036854775650, i64*
15-
// CHECK-NOT: {{^}}[^ ]
16-
// CHECK: store i64 9223372036854775651, i64*
17-
// CHECK-NOT: {{^}}[^ ]
18-
// CHECK: store i64 9223372036854775652, i64*
19-
// CHECK-NOT: {{^}}[^ ]
20-
// CHECK: ret
8+
// CHECK: store <2 x i64> <i64 -159, i64 -158>
9+
// CHECK: store <2 x i64> <i64 -157, i64 -156>
10+
// CHECK: ret
2111
public func charArray(_ i: Int) -> [Character] {
2212
return [ "a", "b", "c", "d" ]
2313
}
2414

2515
// CHECK-LABEL: define {{.*}}singleChar
26-
// CHECK: ret {{.*}} 9223372036854775649
16+
// CHECK: ret {{.*}} -159
2717
public func singleChar() -> Character {
2818
return "a"
2919
}
3020

3121
// CHECK-LABEL: define {{.*}}singleNonAsciiChar
32-
// CHECK: ret {{.*}} 9223372036848850918
22+
// CHECK: ret {{.*}} -5924890
3323
public func singleNonAsciiChar() -> Character {
3424
return ""
3525
}

0 commit comments

Comments
 (0)