Closed Bug 1640565 Opened 5 years ago Closed 4 years ago

Use SSE 4.1 roundsd for Math natives where possible

Categories

(Core :: JavaScript Engine: JIT, task, P2)

task

Tracking

()

RESOLVED FIXED
83 Branch
Tracking Status
firefox83 --- fixed

People

(Reporter: jandem, Assigned: jandem)

References

(Blocks 1 open bug)

Details

Attachments

(2 files)

When SSE 4.1 is supported, Ion uses MNearbyInt for Math.{floor,ceil,trunc} with double input and output, and also for the ToInteger intrinsic.

We should add this optimization to the implementation of MathFunctionNumberResult in CacheIR and Warp.

Assignee: nobody → jdemooij
Status: NEW → ASSIGNED

On CPUs with SSE 4.1 this is quite a lot faster than the C++ call (at least 4x on
some micro-benchmarks) so it's worth keeping this optimization.

Depends on D90983

Pushed by jdemooij@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/084b38a1d9f5 part 1 - Add nearbyIntDouble and nearbyIntFloat32 to the MacroAssembler. r=anba https://hg.mozilla.org/integration/autoland/rev/426234f5047e part 2 - Support roundsd for floor/ceil/trunc in CacheIR and Warp. r=anba
Status: ASSIGNED → RESOLVED
Closed: 4 years ago
Resolution: --- → FIXED
Target Milestone: --- → 83 Branch
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: