Skip to content

[BitwiseCopyable] Drop req from SIMD/Storage. #73890

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
May 25, 2024

Conversation

nate-chandler
Copy link
Contributor

@nate-chandler nate-chandler commented May 24, 2024

There are conformers to SIMDStorage (like that in the added test case) which involve an Array (a type that can't conform to BitwiseCopyable). So lift the constraint on SIMDStorage. This in turn requires lifting the constraint on SIMD (otherwise, e.g. SIMD8<Scalar> would fail to conform since it has as a member some SIMD8Storage which is only constrained to conform to SIMDStorage; the SIMD8Storage associatedtype also cannot be constrained to BitwiseCopyable because that storage may again not conform as in the test example).

rdar://128661878

There are conformers to SIMDStorage (like that in the added test case)
which involve an Array (a type that can't conform to BitwiseCopyable).
So lift the constraint on SIMDStorage.  This in turn requires lifting
the constraint on SIMD (otherwise, e.g. `SIMD8<Scalar>` would fail to
conform since it has as a member some SIMD8Storage which is only
constrained to conform to `SIMDStorage`; the `SIMD8Storage`
associatedtype also cannot be constrained to `BitwiseCopyable` because
that storage may again not conform as in the test example).

rdar://128661878
@nate-chandler
Copy link
Contributor Author

@swift-ci please test

@nate-chandler
Copy link
Contributor Author

@swift-ci please test source compatibility

@nate-chandler
Copy link
Contributor Author

@swift-ci please apple silicon benchmark

@nate-chandler nate-chandler marked this pull request as ready for review May 24, 2024 20:45
@nate-chandler nate-chandler requested a review from a team as a code owner May 24, 2024 20:45
@nate-chandler nate-chandler enabled auto-merge May 24, 2024 22:27
@nate-chandler nate-chandler merged commit c0af25c into swiftlang:main May 25, 2024
6 of 8 checks passed
@nate-chandler nate-chandler deleted the rdar128661878 branch May 25, 2024 02:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants