Leverage experimental Extended Multiplication WAsm SIMD instructions#1202
Closed
copybara-service[bot] wants to merge 1 commit intomasterfrom
Closed
Leverage experimental Extended Multiplication WAsm SIMD instructions#1202copybara-service[bot] wants to merge 1 commit intomasterfrom
copybara-service[bot] wants to merge 1 commit intomasterfrom
Conversation
PiperOrigin-RevId: 345735031
omnisip
reviewed
Dec 6, 2020
| const v128_t vq31prod01 = wasm_i64x2_shl(vprod01, 1); | ||
| const v128_t vq31prod23 = wasm_i64x2_add(vprod23, vprod23); | ||
| const v128_t vq31prod45 = wasm_i64x2_shl(vprod45, 1); | ||
| const v128_t vq31prod67 = wasm_i64x2_add(vprod67, vprod67); |
There was a problem hiding this comment.
@Maratyszcza what benefit do you get out of using a wasm_i64x2_shl(...,1) over adding it twice? Is it because of the latency and the ALU?
Contributor
There was a problem hiding this comment.
More even distribution of uops across execution ports and shorter average latency. Older x86 CPUs (e.g. pre-Nehalem and Atom uarchs) have high latency for [V]PADDQ, so it pays off to replace additions with shifts. However, CPUs often have fewer SIMD shift ports than SIMD ALU ports, so we don't want to replace all additions with shifts.
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.
Leverage experimental Extended Multiplication WAsm SIMD instructions