Intrinsics for divideUnsigned/remainderUnsigned

David Lloyd david.lloyd at
Mon Apr 20 14:38:44 UTC 2020

Am I correct in understanding that there are no compiler intrinsics
for Long.divideUnsigned/remainderUnsigned?

The implementation seems pretty expensive for an operation that is, if
I understand correctly, a single instruction on many CPU
architectures.  But maybe these methods are not very frequently used?
(My clue was a comment in the source referencing an algorithm from
Hacker's Delight that could be used - if such an algorithm exists, but
wasn't implemented, presumably demand is low?)

More information about the compiler-dev mailing list