-
Notifications
You must be signed in to change notification settings - Fork 5.1k
Add support for the Avx512 Compress/Expand intrinsics #116567
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
Conversation
9f26878
to
2b2edb4
Compare
CC. @dotnet/jit-contrib, @EgorBo |
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.
Pull Request Overview
This pull request adds support for the AVX512 Compress/Expand intrinsics by implementing new APIs in the runtime libraries, updating the reference assemblies, and modifying the JIT and emitter to handle the new instructions. Key changes include:
- New definitions in System.Runtime.Intrinsics and System.Private.CoreLib for Compress and Expand intrinsics across multiple data types and vector sizes.
- Updates to the JIT lowering, code generation, and hardware intrinsic lists to correctly recognize and handle the new AVX512 compress/expand operations.
- Enhancements in test projects and intrinsic test generation to validate the new functionality.
Reviewed Changes
Copilot reviewed 32 out of 32 changed files in this pull request and generated 1 comment.
Show a summary per file
File | Description |
---|---|
src/tests/JIT/HardwareIntrinsics/X86_Avx512/Avx512Vbmi2/Program.Avx512Vbmi2.cs | New test file for AVX512 Vbmi2 intrinsics support. |
src/libraries/System.Runtime.Intrinsics/ref/System.Runtime.Intrinsics.cs | Added reference signatures for Compress and Expand intrinsics. |
src/libraries/System.Private.CoreLib/ (multiple files) | Implementation of Compress/Expand intrinsics and platform stubs. |
src/coreclr/jit/* and src/coreclr/jit/emitxarch.cpp, hwintrinsic* files | JIT lowering and codegen updates to support new intrinsics. |
src/coreclr/jit/hwintrinsiclistxarch.h | New hardware intrinsic entries for Compress and Expand. |
Comments suppressed due to low confidence (1)
src/coreclr/jit/lowerxarch.cpp:10492
- The new case for NI_AVX512_CompressMask and NI_AVX512_ExpandMask efficiently optimizes merge with zero by containing the operand. Please verify that this zero merge optimization covers all expected scenarios and does not introduce side effects.
case NI_AVX512_CompressMask:
Tagging subscribers to this area: @JulieLeeMSFT, @jakobbotsch |
This makes progress towards completing the remaining APIs from #87097