Skip to content

Commit

Permalink
Temporarily remove the global min(a,b) and max(a,b) SIMD functions. (#…
Browse files Browse the repository at this point in the history
…23960)

These are triggering a bad compile-time regression for some expressions; that's a bug that should be fixed, but we don't know how to fix it yet, so we'll need to remove these in the short-term, and possibly spell them differently in the medium term.
  • Loading branch information
stephentyrone authored Apr 12, 2019
1 parent 93d383f commit 9e61aae
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion stdlib/public/core/SIMDVector.swift
Original file line number Diff line number Diff line change
Expand Up @@ -467,15 +467,17 @@ extension SIMD where Scalar: Comparable {
return lhs .> Self(repeating: rhs)
}

/* Temporarily removed pending plan for Swift.min / Swift.max
@_alwaysEmitIntoClient
public mutating func clamp(lowerBound: Self, upperBound: Self) {
self = self.clamped(lowerBound: lowerBound, upperBound: upperBound)
}

@_alwaysEmitIntoClient
public func clamped(lowerBound: Self, upperBound: Self) -> Self {
return Swift.min(upperBound, Swift.max(lowerBound, self))
}
*/
}

extension SIMD where Scalar: FixedWidthInteger {
Expand Down Expand Up @@ -1341,6 +1343,10 @@ public func all<Storage>(_ mask: SIMDMask<Storage>) -> Bool {
return mask._storage.max() < 0
}

/*
Temporarily removed while we investigate compile-time regressions caused by
introducing these global functions.

/// The lanewise minimum of two vectors.
///
/// Each element of the result is the minimum of the corresponding elements
Expand Down Expand Up @@ -1397,3 +1403,4 @@ where V: SIMD, V.Scalar: FloatingPoint {
}
return result
}
*/

0 comments on commit 9e61aae

Please sign in to comment.