-
Notifications
You must be signed in to change notification settings - Fork 35
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
carry intrinsics? #90
Comments
Are you talking about an architecture-specific intrinsic (which is a quite different thing from an LLVM intrinsic) See some discussion about that here: #89 (comment) |
Very much possible! Thanks for the pointer. |
@Seelengrab I'd be happy to have generic add-with-carry functions in SIMD.jl. However, these need to work on (and be reasonably efficient on) all architectures. You would use the architecture-specific intrinsics if they are available, but a generic fallback needs to exist. If I recall correctly, the condition for "overflow" (i.e. "carry is set") is (when adding):
This can be implemented with respective exclusive or statements. This code might work for 32-bit signed integers ( |
I'm surprised to see that the carry intrinsics (e.g. adding with carry, I think it's called
@llvm.x86.addcarry.64
) are not available here. Are they provided in some other package and I've just missed them?I'd be happy to add them, but I've never worked with LLVM intrinsics before, so I'd be happy about some guidance.
The text was updated successfully, but these errors were encountered: