[all-commits] [llvm/llvm-project] f5ad9c: [builtins] Write __divmoddi4/__divmodsi4 in terms ...
topperc via All-commits
all-commits at lists.llvm.org
Thu Sep 10 08:10:14 PDT 2020
Branch: refs/heads/master
Home: https://github.com/llvm/llvm-project
Commit: f5ad9c2e0ea60dc5426def7a54f04347a33a952e
https://github.com/llvm/llvm-project/commit/f5ad9c2e0ea60dc5426def7a54f04347a33a952e
Author: Craig Topper <craig.topper at intel.com>
Date: 2020-09-10 (Thu, 10 Sep 2020)
Changed paths:
M compiler-rt/lib/builtins/divmoddi4.c
M compiler-rt/lib/builtins/divmodsi4.c
Log Message:
-----------
[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
More information about the All-commits
mailing list