Skip to content
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

Add base2.fixed.div lowering with multiplicative inverse #3

Open
1 task
KFAFSP opened this issue Jan 24, 2023 · 0 comments
Open
1 task

Add base2.fixed.div lowering with multiplicative inverse #3

KFAFSP opened this issue Jan 24, 2023 · 0 comments

Comments

@KFAFSP
Copy link
Owner

KFAFSP commented Jan 24, 2023

On closed Z groups, we can implement division by a constant divisor by computing a constant multiplicative inverse that we can multiply a quotient with. This optimization is necessary to achieve good fixed-point division performance, and is common in mainline compilers already.

  • Are there parameters to this process? The precision of the inverse may be adjusted. How does the lowering derive these paramters? (Maybe introduce a base2.fixed.reciprocal operation for this).
  • Implement a lowering from base2.fixed.div (maybe also base2.div) to multiplication for constant rhs terms.
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

No branches or pull requests

1 participant