-
-
Notifications
You must be signed in to change notification settings - Fork 15k
Tracking Issue for uint_gather_scatter_bits #149069
Copy link
Copy link
Open
Labels
C-tracking-issueCategory: An issue tracking the progress of sth. like the implementation of an RFCCategory: An issue tracking the progress of sth. like the implementation of an RFCT-libs-apiRelevant to the library API team, which will review and decide on the PR/issue.Relevant to the library API team, which will review and decide on the PR/issue.
Metadata
Metadata
Assignees
Labels
C-tracking-issueCategory: An issue tracking the progress of sth. like the implementation of an RFCCategory: An issue tracking the progress of sth. like the implementation of an RFCT-libs-apiRelevant to the library API team, which will review and decide on the PR/issue.Relevant to the library API team, which will review and decide on the PR/issue.
Type
Fields
Give feedbackNo fields configured for issues without a type.
Feature gate:
#![feature(uint_gather_scatter_bits)]This is a tracking issue for two functions that operate on masked bits:
extract_bitsconsolidates masked bits into the least significant bits of an integer, anddeposit_bitsdistributes bits from the least significant bits of an integer to the bits specified by a mask.The functions are implemented on unsigned integers and correspond to the hardware instructions known on some platforms as "bit extract" and "bit deposit" (PEXT/PDEP).
Public API
Steps / History
uint_gather_scatter_bitsfeature for unsigned integers #149097Unresolved Questions
As of November 2025, there is currently no LLVM intrinsic to guarantee that the code generated is optimal for the target or generates the target architecture instruction if present and the target feature is specified.This is a roadblock for stabilization. Update(2026-June): LLVM intrinsics are implemented, waiting for next LLVM bump before we can use them.Naming: The libs team prefersThe functions have been renamed according to the libs decision in Tracking Issue forgather/scatter_bitswhile that is at odds with how SIMD instructions use the termsgather/scatter. ACP: Add functions for "compress bits" and "expand bits" to unsigned integers libs-team#695 (comment):uint_gather_scatter_bits#149069 (comment)Footnotes
https://std-dev-guide.rust-lang.org/feature-lifecycle/stabilization.html ↩