Skip to content

Commit 264b171

Browse files
Merge pull request #314 from stephentyrone/relax-f16-x86
Restore relaxed mul/add bindings for Float16 on x86
2 parents 6356eb3 + cd967fa commit 264b171

File tree

2 files changed

+0
-6
lines changed

2 files changed

+0
-6
lines changed

Sources/RealModule/Float16+Real.swift

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -173,9 +173,6 @@ extension Float16: Real {
173173
}
174174
#endif
175175

176-
// TODO: once clang stabilizes the calling conventions for _Float16 on Intel,
177-
// we can re-enable these; presently the type is disabled on the target.
178-
#if !(arch(i386) || arch(x86_64))
179176
@_transparent
180177
public static func _relaxedAdd(_ a: Float16, _ b: Float16) -> Float16 {
181178
_numerics_relaxed_addf16(a, b)
@@ -185,7 +182,6 @@ extension Float16: Real {
185182
public static func _relaxedMul(_ a: Float16, _ b: Float16) -> Float16 {
186183
_numerics_relaxed_mulf16(a, b)
187184
}
188-
#endif
189185
}
190186

191187
#endif

Sources/_NumericsShims/include/_NumericsShims.h

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -389,7 +389,6 @@ HEADER_SHIM long double libm_lgammal(long double x, int *signp) {
389389
// MARK: - math inlines with relaxed semantics to support optimization.
390390
#define CLANG_RELAX_FP _Pragma("clang fp reassociate(on) contract(fast)")
391391

392-
#if !(__i386__ || __x86_64__)
393392
/// a + b with the "allow reassociation" and "allow FMA formation" flags
394393
/// set in the IR.
395394
HEADER_SHIM _Float16 _numerics_relaxed_addf16(_Float16 a, _Float16 b) {
@@ -403,7 +402,6 @@ HEADER_SHIM _Float16 _numerics_relaxed_mulf16(_Float16 a, _Float16 b) {
403402
CLANG_RELAX_FP
404403
return a * b;
405404
}
406-
#endif
407405

408406
/// a + b with the "allow reassociation" and "allow FMA formation" flags
409407
/// set in the IR.

0 commit comments

Comments
 (0)