Closed Bug 1712303 Opened 3 years ago Closed 3 years ago

Port strength reduction for i64 multiplication from x64

Categories

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

ARM64
All
enhancement

Tracking

()

RESOLVED FIXED
90 Branch
Tracking Status
firefox90 --- fixed

People

(Reporter: lth, Assigned: lth)

References

(Blocks 2 open bugs)

Details

Attachments

(1 file)

It's straightforward to port the x64 strength reduction code to arm64 as a stopgap until we have the time to clean up strength reduction across the board (bug 1712298).

We want codegen tests for this, and they should also test 32-bit multiply and 32/64-bit multiply on x64.

Ported the strength reduction optimization for n*c when n is i64 and c
is a friendly constant from x64 to arm64; a merging of these
implementations (and the implementations for i32) will happen in a
later bug.

Added test cases that these optimizations are triggered properly for
both i32 and i64.

Depends on D115695

See Also: → 1712321

This should really be done once at the MIR level; it's not clear to me what
the win is for doing it per-arch at the LIR level. I guess that's what bug 1712298
might do.

(In reply to Julian Seward [:jseward] from comment #2)

This should really be done once at the MIR level; it's not clear to me what
the win is for doing it per-arch at the LIR level. I guess that's what bug 1712298
might do.

Precisely. The code should be commoned if at all possible, and 32-bit and 64-bit should have the same cases when possible (and 64-bit currently ignores overflow and should probably have asserts to ensure the nodes are not fallible, as they should not be). Finally, when emitting multiply-by-constant we may have some platform-dependent strategies (see nbp's comments on the other bug) so we may need a little bit of parameterization for that, but we'll see how far we take it.

Pushed by lhansen@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/0570f92e9ffe
Port strength reduction for i64 multiply to arm64. r=jseward
Flags: needinfo?(lhansen)

Earlier patch in the queue at fault.

Flags: needinfo?(lhansen)
Pushed by lhansen@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/0525c2e47b6f
Port strength reduction for i64 multiply to arm64. r=jseward
Status: ASSIGNED → RESOLVED
Closed: 3 years ago
Resolution: --- → FIXED
Target Milestone: --- → 90 Branch
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: