GCC Newspaper
NOVEMBER 30, 2026
Date
/
Architectures
Components
Topics
News & Policy
Other
optab

optab: Make SAD a convert optab.

Sum of absolute differences operation now treated as a conversion.

The sum of absolute differences (SAD) operation has been reclassified as a convert optab. This change affects how SAD is handled in various configurations, including aarch64, SVE, NEON, i386, loongarch, and RS6000. Documentation and internal pattern matching have been updated to reflect this new classification, impacting vectorization and cost evaluation.

In Details

The SAD_EXPR has been converted from a 'plain' optab to a convert optab in GCC's optabs infrastructure. This change involves adjusting pattern definitions and recognizers (like vect_recog_sad_pattern) to use the new conv_optab mechanism. This impacts how the compiler represents and expands SAD operations, potentially affecting downstream passes that rely on optab classifications for code generation or optimization, particularly in SIMD/vectorization contexts.

Filed Under: optabvectorization