Skip to content
Commit f5ad9c2e authored by Craig Topper's avatar Craig Topper
Browse files

[builtins] Write __divmoddi4/__divmodsi4 in terms __udivmod instead of __div and multiply.

Previously we calculating the remainder by multiplying the
quotient and divisor and subtracting from the dividend.

__udivmod can calculate the remainder while calculating the
quotient. We just need to correct the sign afterward.

Reviewed By: MaskRay

Differential Revision: https://reviews.llvm.org/D87433
parent 29cecbc5
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment