Closed Bug 1639517 Opened 6 years ago Closed 6 years ago

Optimize SIMD shifts in Ion x86_64

Categories

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

x86_64
All
enhancement

Tracking

()

RESOLVED FIXED
mozilla78
Tracking Status
firefox78 --- fixed

People

(Reporter: lth, Assigned: lth)

References

Details

Attachments

(1 file)

Currently the MacroAssembler only supports variable shift count arguments for the SIMD bitwise shifts. This is bad in several ways:

  • we do not get to use the architecture's constant-shift instructions
  • we must load the shift count into registers
  • register pressure is higher than it need be
  • we must mask the shift count before it is used; this is redundant if it is constant (though clearly we could avoid this even while using variable-shift registers by communicating to masm that the shift count does not need masking)
  • byte shifts generate horrific code because they are not supported by the architecture and must be emulated with word shifts; at least if the shift counts are known, we can use other arithmetic instructions sometimes (shl by 1 is a lane-wise add, for example)

We should handle at least reasonable cases of constant shifts better.

Block on the shuffle patch so that we can use the optimization tracking framework for testing.

Depends on: 1639464
Attachment #9150427 - Attachment description: Bug 1639517 - wasm ion simd: optimize shifts (WIP) → Bug 1639517 - wasm ion simd: optimize shifts. r?jseward
Blocks: 1640662
Blocks: 1640669
Attachment #9150427 - Attachment description: Bug 1639517 - wasm ion simd: optimize shifts. r?jseward → Bug 1639517 - wasm ion simd: optimize shifts. r=jseward
Pushed by lhansen@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/7a6cac6f591d wasm ion simd: optimize shifts. r=jseward
Status: ASSIGNED → RESOLVED
Closed: 6 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla78
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: