Obviously, a minus + reminder is faster than divide and multiply in most of the platform.
Diff Detail
Diff Detail
- Repository
- rG FreeBSD src repository
- Lint
Lint Passed - Unit
No Test Coverage - Build Status
Buildable 71063 Build 67946: arc lint + arc unit
Event Timeline
Comment Actions
Does it actually make a difference in generated code? I would expect a compiler to be able to do this transformation.
Comment Actions
I did some experiment and you are right, the compiler optimize it above O1.
Also, my assumption is wrong since reminder in aarch64 actually convert into udiv + msub, which is not faster than what we previous have.
Thanks!