-
Notifications
You must be signed in to change notification settings - Fork 291
Adding the x86 part of behavioural testing for std::arch intrinsics #1814
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?
Adding the x86 part of behavioural testing for std::arch intrinsics #1814
Conversation
trait to make the same dyn-compatible.
intrinsic-test's X86IntrinsicType struct
23674fb
to
c80661a
Compare
Since the bootstrap compiler of Rust is bumped to the commit 5dadfd5c417f0b66816cb7ca662859e2c8751fb3 (version 1.88.0-beta.3 2025-05-11), some features should be safe to enable cfg checks. RISC-V Features: * "zicsr" * "zicntr" * "zihpm" * "zifencei" * "zihintntl" * "zihintpause" * "zimop" * "zicboz" * "zicond" * "ztso" * "zfa" * "zca" * "zcb" * "zcmop" * "b" x86 Features: * "amx-avx512" * "amx-fp8" * "amx-movrs" * "amx-tf32" * "amx-transpose"
- The 2nd argument of the LLVM intrinsic should be IMMARG
- use correct intrinsic for unpackl - fix invalid use of `simd_{or,and,xor}` on floating point vectors - `vec_search_string` should require `vector-enhancements-2`
- add `-Zverify-llvm-ir` in testsuite
As the author confirmed as in: <https://lists.infradead.org/pipermail/linux-riscv/2025-May/070844.html>, runtime detection of the Zicntr extension (as in the Linux kernel 6.15) is currently (and technically) redundant on the current base IMA behavior (although can be meaningful if new base behavior is added). This commit implies the Zicntr extension from the base IMA behavior.
It modernizes the coding style of the crate stdarch-gen-arm by fixing Clippy warnings (except clippy::{collapsible_if,obfuscated_if_else} that might make the program look worse as a result of "fixing" warnings). Clippy: rust version 1.89.0-nightly (6f6971078 2025-05-28) Number of Fixed Warnings: 84/84 Note: Rust Analyzer double counts one of the Clippy warnings so it reduces 85 warnings (as reported by the Rust Analyzer). This commit also applies similar technique used to resolve Clippy warnings but also simplifies identifier name formatting and makes reading easier. Confirmed that the exact same code will be generated.
It modernizes the coding style of the crate stdarch-gen-loongarch by fixing Clippy warnings. Clippy: rust version 1.89.0-nightly (6f6971078 2025-05-28) Number of Fixed Warnings: 1/1 Confirmed that the exact same code will be generated (note that, generated.rs in the repository is *not* an exact output but some spaces removed).
It modernizes the coding style of the crate stdarch-test by fixing Clippy warnings. Clippy: rust version 1.89.0-nightly (6f6971078 2025-05-28) Number of Fixed Warnings: 1/1
It modernizes the coding style of the crate stdarch-verify by dealing with Clippy warnings (allows clippy::collapsible_if but review may be required for later changes). Clippy: rust version 1.89.0-nightly (6f6971078 2025-05-28) Number of Fixed Warnings: 4/4
It modernizes the coding style of the crate stdarch_examples (an example "connect5") by fixing Clippy warnings (except clippy::manual_range_contains in which "fixing" the warning will complicate the code). Clippy: rust version 1.89.0-nightly (6f6971078 2025-05-28) Number of Fixed Warnings: 6/6
It modernizes the coding style of the crate intrinsic-test by fixing Clippy warnings. Clippy: rust version 1.89.0-nightly (6f6971078 2025-05-28) Number of Fixed Warnings: 36/36
To make the type names to test correct, this commit replaces occurrences of `rust_prefix` to `c_prefix` where necessary.
It seems it returns true when *no* constraints are found, opposite to the expected behavior of the function name. This commit reverses condition as the name suggests.
This commit adds support for `riscv_hwprobe` on the Linux kernel 6.15. It adds feature detection of 8 extensions (4 of them are new in this). Existing RISC-V Extensions: 1. "Zicntr" 2. "Zihpm" 3. "Zalrsc" 4. "Zaamo" New RISC-V Extensions: 5. "Zicbom" 6. "Zfbfmin" 7. "Zvfbfmin" 8. "Zvfbfwma"
ae4cb22
to
b2777ac
Compare
b2777ac
to
7047369
Compare
match self { | ||
Self::BFloat => "bfloat", | ||
Self::Float => "float", | ||
Self::Int => "int", | ||
Self::UInt => "uint", | ||
Self::Double => "double", | ||
Self::Int(true) => "int", | ||
Self::Int(false) => "uint", | ||
Self::Poly => "poly", | ||
Self::Void => "void", | ||
Self::Char(true) => "char", | ||
Self::Char(false) => "unsigned char", | ||
Self::Short(true) => "short", | ||
Self::Short(false) => "unsigned short", |
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.
@Amanieu @adamgemmell Are we using this trait (fmt::Display for TypeKind
) anywhere in the crate? I was searching for its usage and I was unable to find any.
If we are not using this trait, may I delete the definition?
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 suspect this may be useful for debug output during development. However since it isn't used for functionality then it's fine to make any changes you want to it.
Pardon the git history, I will be sorting that out shortly |
No description provided.