-
Notifications
You must be signed in to change notification settings - Fork 356
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
Implement llvm.ctpop.v*
intrinsics
#3072
Conversation
Tested through x86 avx512vpopcntdq and avx512bitalg functions.
let (op, op_len) = this.operand_to_simd(op)?; | ||
let (dest, dest_len) = this.place_to_simd(dest)?; | ||
|
||
assert_eq!(dest_len, op_len); |
This comment was marked as outdated.
This comment was marked as outdated.
Sorry, something went wrong.
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.
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.
We generally have the policy that ICEing when intrinsics are used incorrectly is fine. I think we should apply that to LLVM intrinsics as well. If rust-lang/rust#116093 lands, people will get an appropriate warning when enabling the feature.
Thanks! |
☀️ Test successful - checks-actions |
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.
These test files are getting a bit too fine-grained IMO. What about just using intrinsics-x86-other
for "everything except the SSE/SSE2 intrinsics"? llvm.x86.addcarry.64 should also be tested there, probably.
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.
Ah, we already have tests/pass/intrinsics-x86.rs. So this could be added there?
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.
The tests are grouped by what CPU features they use, and the avx512 CPU features are significantly more fine-grained than the others. I wouldn't mind lumping all the avx512 intrinsics together, but I don't think they belong in "other" with llvm.x86.rdtsc
.
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.
Ah, that's fair. But the two test files added by this PR should IMO be merged.
@eduardosm can you wile a follow-up PR?
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.
I will!
Tested through x86 avx512vpopcntdq and avx512bitalg functions.
I picked them from #2057 (comment), which looked easy.