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 divmod functions to RuntimeLibcalls.def #68462

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

Conversation

boomshroom
Copy link

@boomshroom boomshroom commented Oct 7, 2023

Partially addresses #46350 by adding __{,u}divmod{s,d,t}i4 entries to RuntimeLibcalls.def. These functions exist in compiler-rt and appear to exist in libgcc, so it should be safe to emit calls to them. __{,u}divmod{q,h}i4 are not included due to not having generic implementations in compiler-rt (though they are enabled for specific targets for which they have optimized implementations).

__{,u}divmodti4 do not appear to be built for 32-bit platforms, though neither are __{,u}{div,mod}ti3, but they still have RuntimeLibcalls.def entries despite that.

This does not include optimizations (or de-optimizations) to better prepare the code generator to emit calls to these, but is instead meant to serve as a first step to optimizing these kinds of situations.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants