Skip to content
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

x64: improve multiplication lowering #2889

Merged
merged 3 commits into from
May 14, 2021

Conversation

abrown
Copy link
Contributor

@abrown abrown commented May 10, 2021

Since the lowering of imul complicated the other ALU operations it was
matched with and since future commits will alter the multiplication
lowering further, this change moves the imul lowering to its own match
block. Then, it improves the filetests and uses VPMULLQ as a lowering
for imul.i64x2 when the instruction is available.

@github-actions github-actions bot added cranelift Issues related to the Cranelift code generator cranelift:area:x64 Issues related to x64 codegen labels May 10, 2021
@abrown abrown force-pushed the inst-format-5 branch 2 times, most recently from d86db43 to c42fe4e Compare May 13, 2021 23:18
abrown added 3 commits May 13, 2021 16:18
Since the lowering of `imul` complicated the other ALU operations it was
matched with and since future commits will alter the multiplication
lowering further, this change moves the `imul` lowering to its own match
block.
This adds the machinery to encode the VPMULLQ instruction which is
available in AVX512VL and AVX512DQ. When these feature sets are
available, we use this instruction instead of a lengthy 12-instruction
sequence.
@abrown abrown requested a review from cfallin May 13, 2021 23:19
@abrown abrown marked this pull request as ready for review May 13, 2021 23:24
Copy link
Member

@cfallin cfallin left a comment

Choose a reason for hiding this comment

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

Looks great!

@abrown abrown merged commit e676589 into bytecodealliance:main May 14, 2021
@abrown abrown deleted the inst-format-5 branch May 14, 2021 03:14
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