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

AArch64 SIMD: replace LoadSplat with pattern-matching on load+splat #2376

Merged
merged 2 commits into from
Nov 17, 2020

Conversation

cfallin
Copy link
Member

@cfallin cfallin commented Nov 7, 2020

This PR uses the isel changes introduced in #2366 that allows loads to sink and merge with other operations in order to replace the LoadSplat instruction with more general pattern-matching.

LoadSplat was added as an incremental step to improve AArch64 code quality in #2278. At the time, we did not have a way to pattern-match the load + splat opcode sequence that the relevant Wasm opcodes lowered to. However, now with PR #2366, we can merge effectful instructions such as loads into other ops, and so we can do this pattern matching directly.

PR includes commit from #2366 to allow simultaneous review/CI.

cc @julian-seward1 @akirilov-arm @abrown

@cfallin cfallin added cranelift:area:machinst Issues related to instruction selection and the new MachInst backend. cranelift:area:aarch64 Issues related to AArch64 backend. labels Nov 7, 2020
@github-actions github-actions bot added cranelift Issues related to the Cranelift code generator cranelift:area:x64 Issues related to x64 codegen cranelift:meta Everything related to the meta-language. cranelift:wasm labels Nov 7, 2020
@cfallin cfallin force-pushed the loadsplat branch 4 times, most recently from 764bee0 to 9f00ac5 Compare November 10, 2020 01:56
Copy link
Contributor

@akirilov-arm akirilov-arm left a comment

Choose a reason for hiding this comment

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

LGTM, but I haven't reviewed #2366 and I looked just at the AArch64 and common changes.

This was added as an incremental step to improve AArch64 code quality in
PR bytecodealliance#2278. At the time, we did not have a way to pattern-match the load +
splat opcode sequence that the relevant Wasm opcodes lowered to.
However, now with PR bytecodealliance#2366, we can merge effectful instructions such as
loads into other ops, and so we can do this pattern matching directly.
The pattern-matching update will come in a subsequent commit.
@cfallin
Copy link
Member Author

cfallin commented Nov 16, 2020

@julian-seward1 would you be able to review this at at some point soon? It's blocking #2389 and I just had to invest some time to rebase it over some other changes; hoping to get it in to avoid chasing main.

@cfallin cfallin merged commit 9e511ec into bytecodealliance:main Nov 17, 2020
@cfallin cfallin deleted the loadsplat branch January 6, 2021 18:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cranelift:area:aarch64 Issues related to AArch64 backend. cranelift:area:machinst Issues related to instruction selection and the new MachInst backend. cranelift:area:x64 Issues related to x64 codegen cranelift:meta Everything related to the meta-language. cranelift:wasm cranelift Issues related to the Cranelift code generator
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants