-
Notifications
You must be signed in to change notification settings - Fork 13.8k
Replace manual implementation with carrying_mul_add
#147666
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks! It's essentially the same in LLVM, but it'll go through the intrinsic now so other backends can hopefully do the right thing if they need something else.
r=me when CI is green
(carry as $bigty); | ||
((v >> <$ty>::BITS) as $ty, v as $ty) | ||
let (lo, hi) = self.carrying_mul_add(other, other2, carry); | ||
(hi, lo) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh, interesting that this method had picked the opposite order. I guess we were all taught math in big-endian, even if it's kinda worse 🙃
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah, it was not obvious at first, so it took some time to understand why tests are not passing
Oh, I can't do it 😅 so I'm worry you will need to r+ it yourself or delegate rights for this one |
@bors r=scottmcm |
cc #146277 (comment)
r? scottmcm