10000 Introduce IR BinaryOps for unsigned division and remainder. by sjrd · Pull Request #5171 · scala-js/scala-js · GitHub
[go: up one dir, main page]

Skip to content

Introduce IR BinaryOps for unsigned division and remainder. #5171

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

sjrd
Copy link
Member
@sjrd sjrd commented May 16, 2025

This allows to better mutualize their implementation with the signed divisions.

Moreover, our 3 implementation strategies (JS with RuntimeLong, JS with bigint and Wasm) have different efficient implementations of those operations. Using IR BinaryOps for them allows each backend to use the most appropriate implementation, while letting the optimizer generically manipulate their mathematical properties.

@sjrd sjrd requested a review from gzm0 May 16, 2025 13:17
This allows to better mutualize their implementation with the
signed divisions.

Moreover, our 3 implementation strategies (JS with `RuntimeLong`,
JS with `bigint` and Wasm) have different efficient implementations
of those operations. Using IR BinaryOps for them allows each backend
to use the most appropriate implementation, while letting the
optimizer generically manipulate their mathematical properties.
@sjrd sjrd force-pushed the ir-unsigned-div-mod branch from d1c4295 to 9410652 Compare May 19, 2025 21:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant
0