3 ms·
> (games, video codecs, etc.) prefer the intrinsics Nit: Most of the projects I'm familiar with (libav/ffmpeg, x264, etc) prefer to break out the SIMD into han
by jallmann 12y ago
> (games, video codecs, etc.) prefer the intrinsics
Nit: Most of the projects I'm familiar with (libav/ffmpeg, x264, etc) prefer to break out the SIMD into hand-written functions, instead of relying on intrinsics or even inline asm. This avoids problems with register allocation and code gen, consistency/portability between compilers, etc.
Otherwise, yes, autovectorization is hard, both for application developers and compiler writers. Application code needs to be structured in a very precise way, and the correctness of C -> SIMD transformations needs to be proven. Intrinsics and hand-written SIMD aren't going away.
- pcwalton 12y ago> This avoids problems with register allocation and code gen, consistency/portability between compilers, etc. Yup. Which just goes to show: reliability is king.