mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
[CSOptimizer/Tests] NFC: Add a perf test-case fixed by improved literal array handling
This commit is contained in:
@@ -0,0 +1,23 @@
|
||||
// RUN: %scale-test --begin 1 --end 15 --step 1 --select NumLeafScopes %s --expected-exit-code 0
|
||||
// REQUIRES: asserts,no_asan
|
||||
|
||||
enum E {
|
||||
case a
|
||||
case b
|
||||
case c(Int32)
|
||||
}
|
||||
|
||||
struct Tester {
|
||||
mutating func test(arr: [E], cond: Bool = false) {}
|
||||
mutating func test(arr: E..., cond: Bool = false) {}
|
||||
}
|
||||
|
||||
func test() {
|
||||
var tester = Tester()
|
||||
tester.test(arr: [
|
||||
.c(1), .a,
|
||||
%for i in range(N):
|
||||
.c(1 << 4 | 8), .c(0),
|
||||
%end
|
||||
.c(1), .b])
|
||||
}
|
||||
Reference in New Issue
Block a user