Closed Bug 1750049 Opened 2 years ago Closed 2 years ago

[wasm] Generate AVX2 VBROADCASTx for splats

Categories

(Core :: JavaScript: WebAssembly, enhancement, P3)

enhancement

Tracking

()

RESOLVED FIXED
98 Branch
Tracking Status
firefox98 --- fixed

People

(Reporter: yury, Assigned: yury)

References

Details

Attachments

(1 file)

Currently we use slow PSHUFx instructions for any broadcast operation (splat or load_splat). With AVX2 support, we can use specialized VBROADCASTx instructions.

Blocks: 1749788

There is no much performance win based on my microbenches. The quick scouting internet for latency info somewhat confirming that the performance of pshuf and vbroadcast somewhat identical. The only perceived win I see is in encoding and clarity of float-vs-int data.

See Also: → 1693497

Microbenchmarks for v128.loadXX_splat, on the other hand, produce 50% win. Combining load and broadcast into single op makes everything faster.

Attachment #9259167 - Attachment description: WIP: Bug 1750049 - [wasm] Use AVX2 ops for splat ops. → Bug 1750049 - [wasm] Use AVX2 ops for splat instructions. r?jseward

v128.loadXX_splat is used in Google Meet, Zoom, Lichess so we might see a little win there.

See Also: → 1672697
Pushed by ydelendik@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/3a8c6fb0c928
[wasm] Use AVX2 ops for splat instructions. r=jseward
Status: ASSIGNED → RESOLVED
Closed: 2 years ago
Resolution: --- → FIXED
Target Milestone: --- → 98 Branch
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: