mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
Also, fix and enable `IRGen/lto_autolink` for all non-Wasm targets and `IRGen/static_initializer` for aarch64. This should get [the community Android CI](https://ci-external.swift.org/job/oss-swift-RA-linux-ubuntu-24.04-android-build/) green [again](https://ci-external.swift.org/job/oss-swift-RA-linux-ubuntu-24.04-android-arm64/).
23 lines
807 B
Swift
23 lines
807 B
Swift
// RUN: %target-build-swift -emit-ir %s | %FileCheck -check-prefix=%target-cpu %s
|
|
// RUN: %target-build-swift -O -emit-ir %s | %FileCheck -check-prefix=%target-cpu %s
|
|
// RUN: %target-build-swift -Ounchecked -emit-ir %s | %FileCheck -check-prefix=%target-cpu %s
|
|
|
|
// REQUIRES: CPU=i386 || CPU=x86_64
|
|
//
|
|
// Windows and Android do not expose Float80.
|
|
// UNSUPPORTED: OS=windows-msvc, OS=linux-android
|
|
|
|
var globalFloat80 : Float80 = 0.0
|
|
|
|
@inline(never)
|
|
func acceptFloat80(_ a: Float80) {
|
|
globalFloat80 = a
|
|
}
|
|
|
|
func testConstantFoldFloatLiterals() {
|
|
acceptFloat80(1.0)
|
|
}
|
|
|
|
// i386: call swiftcc void @"$s20FloatingPointIR_FP8013acceptFloat80yys0F0VF{{.*}}"(x86_fp80 0xK3FFF8000000000000000)
|
|
// x86_64: call swiftcc void @"$s20FloatingPointIR_FP8013acceptFloat80yys0F0VF{{.*}}"(x86_fp80 0xK3FFF8000000000000000)
|