[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
Loading
Please sign in to comment