Open
Description
Rust 1.87 made SIMD intrinsics that don't touch pointers safe to call: rust-lang/stdarch#1714
Due to the requirement to match libwebp output bit-for-bit we're using an emulation of the _mm_mulhi_epu16
intrinsic used by libwebp:
Lines 971 to 974 in 93baf7d
It would be interesting to try replacing it with the actual _mm_mulhi_epu16
now that it doesn't need unsafe
and see if that changes the assembly in any way (hopefully for the better).
Here's the current state on godbolt, and it produces quite a lot of assembly: https://rust.godbolt.org/z/3afeY35EG