Why are x86 intrinsics not always inlined

โš“ Rust    ๐Ÿ“… 2025-11-13    ๐Ÿ‘ค surdeus    ๐Ÿ‘๏ธ 9      

surdeus

Warning

This post was published 66 days ago. The information described in this article may have changed.

I was playing around with computing some CRC checksums using the x86 CRC32 instruction, and I noticed something in that surprised me. The compiler does not seem to inline calls to the _mm_crc32_u8 intrinsic.

I did a little bit more playing around, and it seems to do this for a few of the intrinsics. See the (somewhat contrived) example I've made here

This strikes me as odd, as these are things that tend to be in hot loops, so any it seems like inlining would be ideal.
Whatโ€™s the reason for this behavior?

4 posts - 3 participants

Read full topic

๐Ÿท๏ธ Rust_feed