Change Simd::splat to not generate a loop#284
Merged
calebzulawski merged 2 commits intorust-lang:masterfrom Jun 22, 2022
Merged
Change Simd::splat to not generate a loop#284calebzulawski merged 2 commits intorust-lang:masterfrom
Simd::splat to not generate a loop#284calebzulawski merged 2 commits intorust-lang:masterfrom
Conversation
This fixes poor codegen in some circumstances for `u16x8::splat` on x86_64 https://rust-lang.zulipchat.com/#narrow/stream/257879-project-portable-simd/topic/Very.20bad.20.60u16x8.3A.3Asplat.60.20codegen.20on.20x86_64
calebzulawski
approved these changes
Jun 6, 2022
Member
|
Regarding the workaround comment, IMO this is still a better way of representing a splat. This is explicitly a vector operation, the other implementation was relying on auto vectorization. |
Member
|
I agree this is totally a reasonable/natural impl. I don't really think it's a workaround -- while it's unfortunate that |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This fixes poor codegen in some circumstances for
u16x8::splaton x86_64https://rust-lang.zulipchat.com/#narrow/stream/257879-project-portable-simd/topic/Very.20bad.20.60u16x8.3A.3Asplat.60.20codegen.20on.20x86_64
This changes
splatto not beconstsince that now depends on const traits.This is a workaround for: rust-lang/rust#97804
Fixes: #283