What problem does it solve?
Provides practical guidance to diagnose why loops are not being auto-vectorized and to implement efficient SIMD intrinsics for x86 (SSE/AVX) and ARM (NEON), so developers can reliably extract vector performance from hot code paths.
Core Features & Use Cases
- Vectorization diagnosis: How to read compiler vectorization remarks and common reasons a loop was not vectorized, with actionable fixes such as adding restrict, removing data-dependent exits, and hinting trip counts.
- Runtime CPU feature detection and dispatch: Patterns for using compiler builtins, CPUID, and attribute-based or.ifunc dispatch to select SSE/AVX/NEON paths at runtime.
- Intrinsics recipes: Example implementations and idioms for SSE2, AVX2, and NEON including aligned vs unaligned loads, FMA usage, horizontal reductions, and integer operations, plus alignment and allocation advice.
- Decision guidance: When to rely on compiler auto-vectorization versus writing intrinsics, and how to verify correctness and measure performance impact with profiling.
- Use case: Speed up an image processing or numeric kernel by diagnosing why the compiler missed vectorization, then apply targeted intrinsics or small code changes to achieve a stable speedup.
Quick Start
Use the simd-intrinsics skill to analyze compiler vectorization remarks for a hot loop, suggest specific code or flag changes to enable auto-vectorization, and produce matching SSE/AVX or NEON intrinsic snippets.