Files
swift-mirror/validation-test/SILOptimizer/large_inline_array.swift.gyb
T
Aidan Hall 6297fcd815 large_inline_array.swift.gyb: Increase timeout and re-enable
Increase the timeout to 60 seconds, the originally-intended value.

This test was temporarily disabled in #89022.
2026-05-18 15:24:46 +01:00

38 lines
1.1 KiB
Swift

// RUN: %empty-directory(%t)
// RUN: %gyb %s > %t/main.swift
// rdar://175803465 (Large InlineArray compilation takes forever)
// UNSUPPORTED: OS=linux-gnu
// The compiler should finish in less than 15 seconds. To give some slack,
// specify a timeout of 1 minute.
// If the compiler needs more than 1 minute, there is probably a real problem.
// So please don't just increase the timeout in case this fails.
// We emit assembly rather than SIL because the bottleneck in rdar://175803465
// was LLVM machine code generation.
// RUN: %{python} %S/../../test/Inputs/timeout.py 60 %target-swift-frontend -O -parse-as-library -disable-availability-checking -S %t/main.swift | %FileCheck %s
// There is a separate test for an assert-enabled stdlib
// REQUIRES: swift_stdlib_no_asserts,optimized_stdlib
// REQUIRES: long_test
// REQUIRES: CPU=arm64 || CPU=x86_64 || CPU=aarch64
// Check if the optimizer can optimize the whole array into a statically
// initialized global
// CHECK: $s4main3arrs11InlineArrayVy$99999_SiGvp:
// CHECK-NEXT: 8
// CHECK-NEXT: 1
// CHECK-NEXT: 2
public let arr: InlineArray<100000, Int> = [
% for i in range(100000):
${i},
%end
]