Skip to content

Commit cfd34e5

Browse files
committed
[CSOptimizer/Tests] NFC: Add a perf test-case fixed by improved literal array handling
1 parent 8a304f8 commit cfd34e5

File tree

1 file changed

+23
-0
lines changed

1 file changed

+23
-0
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
// RUN: %scale-test --begin 1 --end 15 --step 1 --select NumLeafScopes %s --expected-exit-code 0
2+
// REQUIRES: asserts,no_asan
3+
4+
enum E {
5+
case a
6+
case b
7+
case c(Int32)
8+
}
9+
10+
struct Tester {
11+
mutating func test(arr: [E], cond: Bool = false) {}
12+
mutating func test(arr: E..., cond: Bool = false) {}
13+
}
14+
15+
func test() {
16+
var tester = Tester()
17+
tester.test(arr: [
18+
.c(1), .a,
19+
%for i in range(N):
20+
.c(1 << 4 | 8), .c(0),
21+
%end
22+
.c(1), .b])
23+
}

0 commit comments

Comments
 (0)