|
13 | 13 | import TestsUtils |
14 | 14 |
|
15 | 15 | public let FloatingPointConversion = [ |
16 | | - BenchmarkInfo( |
17 | | - name: "ConvertFloatingPoint.ConcreteDoubleToDouble", |
18 | | - runFunction: run_ConvertFloatingPoint_ConcreteDoubleToDouble, |
19 | | - tags: [.validation, .api], |
20 | | - setUpFunction: { blackHole(doubles) }), |
21 | | - BenchmarkInfo( |
22 | | - name: "ConvertFloatingPoint.GenericDoubleToDouble", |
23 | | - runFunction: run_ConvertFloatingPoint_GenericDoubleToDouble, |
24 | | - tags: [.validation, .api], |
25 | | - setUpFunction: { blackHole(doubles) }), |
26 | 16 | BenchmarkInfo( |
27 | 17 | name: "ConvertFloatingPoint.MockFloat64ToDouble", |
28 | 18 | runFunction: run_ConvertFloatingPoint_MockFloat64ToDouble, |
@@ -61,9 +51,9 @@ extension MockBinaryFloatingPoint { |
61 | 51 | init(_ value: Int) { self.init(_Value(value)) } |
62 | 52 | init(_ value: Float) { self.init(_Value(value)) } |
63 | 53 | init(_ value: Double) { self.init(_Value(value)) } |
64 | | - #if !(os(Windows) || os(Android)) && (arch(i386) || arch(x86_64)) |
65 | | - init(_ value: Float80) { self.init(_Value(value)) } |
66 | | - #endif |
| 54 | +#if !(os(Windows) || os(Android)) && (arch(i386) || arch(x86_64)) |
| 55 | + init(_ value: Float80) { self.init(_Value(value)) } |
| 56 | +#endif |
67 | 57 | init(integerLiteral value: _Value.IntegerLiteralType) { |
68 | 58 | self.init(_Value(integerLiteral: value)) |
69 | 59 | } |
@@ -159,25 +149,7 @@ func convert< |
159 | 149 | U(value) |
160 | 150 | } |
161 | 151 |
|
162 | | -@inline(never) |
163 | | -public func run_ConvertFloatingPoint_ConcreteDoubleToDouble(_ N: Int) { |
164 | | - for _ in 0..<(N * 100) { |
165 | | - for element in doubles { |
166 | | - let f = Double(identity(element)) |
167 | | - blackHole(f) |
168 | | - } |
169 | | - } |
170 | | -} |
171 | | - |
172 | | -@inline(never) |
173 | | -public func run_ConvertFloatingPoint_GenericDoubleToDouble(_ N: Int) { |
174 | | - for _ in 0..<(N * 100) { |
175 | | - for element in doubles { |
176 | | - let f = convert(identity(element), to: Double.self) |
177 | | - blackHole(f) |
178 | | - } |
179 | | - } |
180 | | -} |
| 152 | +// See also: test/SILOptimizer/floating_point_conversion.swift |
181 | 153 |
|
182 | 154 | @inline(never) |
183 | 155 | public func run_ConvertFloatingPoint_MockFloat64ToDouble(_ N: Int) { |
|
0 commit comments