Skip to content

x64: Add support for phadd{w,d} instructions#5896

Merged
alexcrichton merged 1 commit into
bytecodealliance:mainfrom
alexcrichton:x64-phaddwd
Mar 1, 2023
Merged

x64: Add support for phadd{w,d} instructions#5896
alexcrichton merged 1 commit into
bytecodealliance:mainfrom
alexcrichton:x64-phaddwd

Conversation

@alexcrichton
Copy link
Copy Markdown
Member

This commit adds support for the bare lowering of the iadd_pairwise instruction with i16x8 and i32x4 types on the x64 backend. These lowerings are achieved with the phaddw and phaddd instructions, respectively. Additionally AVX encodings of these instructions are added too.

The motivation for these new lowerings comes from the relaxed-simd proposal which will use them in the deterministic lowering of some instructions on the x64 backend.

This commit adds support for the bare lowering of the `iadd_pairwise`
instruction with `i16x8` and `i32x4` types on the x64 backend. These
lowerings are achieved with the `phaddw` and `phaddd` instructions,
respectively. Additionally AVX encodings of these instructions are added
too.

The motivation for these new lowerings comes from the relaxed-simd
proposal which will use them in the deterministic lowering of some
instructions on the x64 backend.
Copy link
Copy Markdown
Member

@abrown abrown left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me; I checked out the instruction encodings and feature flags in the manual and everything looks correct.

@alexcrichton alexcrichton added this pull request to the merge queue Feb 28, 2023
@github-actions github-actions Bot added cranelift Issues related to the Cranelift code generator cranelift:area:x64 Issues related to x64 codegen labels Feb 28, 2023
Merged via the queue into bytecodealliance:main with commit e0ef0b7 Mar 1, 2023
@alexcrichton alexcrichton deleted the x64-phaddwd branch March 1, 2023 00:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

cranelift:area:x64 Issues related to x64 codegen cranelift Issues related to the Cranelift code generator

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants