Closed Bug 2087942 Opened 15 days ago Closed 14 days ago

[loong64] Micro-optimize ma_mul_d and ma_mul

Categories

(Core :: JavaScript Engine: JIT, task)

Other
Unspecified
task

Tracking

()

RESOLVED FIXED
161 Branch
Tracking Status
firefox161 --- fixed

People

(Reporter: csmantle, Assigned: csmantle)

References

(Blocks 1 open bug)

Details

Attachments

(1 external file)

Based on benchmark results, LoongArch has slow MULs (4 cycles of latency on Loongson 3B6000, LA664). The current isel of ma_mul_d and ma_mul performs strength reduction for common patterns, but unfortunately they are not symmetric, nor exercised by codegen tests. We could try to improve it.

This unifies both MASM methods with the following optimizations, with
latency in cycles and calcuated per 0:

    RHS             Latency
    -1              1
    0               1
    1               1
    2               1
    2^n + 1, n<5    1
    2^n + 1, n>=5   2
    2^n             1
    2^n - 1         2
    2^n + 2^m, n>m  3
    (otherwise)     >=4
See Also: → 2088095
Status: ASSIGNED → RESOLVED
Closed: 14 days ago
Resolution: --- → FIXED
Target Milestone: --- → 161 Branch
QA Whiteboard: [qa-triage-done-c162/b161]
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: