HW Intrinsics: Add BSR, BSF, and BSWAP intrinsics #10741
Labels
area-CodeGen-coreclr
CLR JIT compiler in src/coreclr/src/jit and related components such as SuperPMI
enhancement
Product code improvement that does NOT require public API changes/additions
Milestone
BSR & BSF are functionally equivalent to LZCNT & TZCNT for non-zero values - except that instead of needing Haswell/Piledriver plus, the minimum requirement is 80386. Would be nice for things like Span.IndexOf where it's only applied to non-zero values.
BSWAP is an 80486 instruction that reverses the order of bytes. It's supposed to be good for endian-ness conversions, but I care because word on the street is that it's better than rotates for entropy diffusion in hash functions, leading to some of the trendy new fast hash functions (such as FarmHash and t1ha) using it.
category:proposal
theme:hardware-intrinsics
skill-level:intermediate
cost:medium
The text was updated successfully, but these errors were encountered: