Closed Bug 1695599 Opened 9 months ago Closed 6 months ago

SIMD shuffle optimizations in ARM64 Ion

Categories

(Core :: Javascript: WebAssembly, defect, P3)

ARM64
All
defect

Tracking

()

RESOLVED FIXED
90 Branch
Tracking Status
firefox90 --- fixed

People

(Reporter: lth, Assigned: yury)

References

(Blocks 2 open bugs)

Details

Attachments

(1 file)

For reasonable performance, the shuffle optimizations we use for x86 - rewriting the general shuffle as more specialized code based on the shuffle pattern and the inputs - must be ported to arm64.

This will entail adapting the matched patterns to the ARM64 instruction set and perhaps rearranging the patterns to select the best ones first; as a result, there may be some generalization of the matching engine needed so that it can handle different pattern orderings on different systems. Indeed, some patterns may not make sense on some systems.

Blocks: 1687629
No longer blocks: 1695589
Blocks: 1695589

Yury's done most of this so he gets the bug.

Assignee: nobody → ydelendik
Status: NEW → ASSIGNED

Most of the initial optimization will be implemented by bug 1687629. We need to review the pattern matcher -- it is optimized for x86 instructions atm.

Blocks: 1687626
Blocks: 1687630

P1 because blocking P1 bug.

Priority: P3 → P1
Attachment #9221449 - Attachment description: WIP: Bug 1695599 - Improve ARM64 wasm ops for PERMUTE_16x8 and BROADCAST. → WIP: Bug 1695599 - Improve ARM64 wasm ops for PERMUTE_16x8 and BLEND.

We have bad ARM64 for BLEND_8x16, BLEND_16x8 and PERMUTE_16x8 shuffles. PERMUTE_16x8 was to specific to x64 -- it is possible to make it more generic: x64 will get its special cases, and ARM64 will fallback to permute8x16 2-op instructions.

Thought: all these specializations/analysis only make sense if they cleanly map to a single native instructions on at least one platform. Even if they don't have perfect match on other platforms, we need to try to find best/short equivalent to be competitive.

Blocks: 1710882
Attachment #9221449 - Attachment description: WIP: Bug 1695599 - Improve ARM64 wasm ops for PERMUTE_16x8 and BLEND. → Bug 1695599 - Improve ARM64 wasm ops for PERMUTE_16x8 and BLEND. r?lth

Basically an open-ended set here but this is not blocking SIMD on ARM64 any longer.

No longer blocks: 1687626, 1710882
Depends on: 1710882
Priority: P1 → P3
Pushed by ydelendik@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/0a112f944790
Improve ARM64 wasm ops for PERMUTE_16x8 and BLEND. r=lth
Status: ASSIGNED → RESOLVED
Closed: 6 months ago
Resolution: --- → FIXED
Target Milestone: --- → 90 Branch
You need to log in before you can comment on or make changes to this bug.