Porting to GCC 17

The GCC 17 release series differs from previous GCC releases in a number of ways. Some of these are a result of bug fixing, and some old behaviors have been intentionally changed to support new standards, or relaxed in standards-conforming ways to facilitate compilation or run-time performance.

Some of these changes are user visible and can cause grief when porting to GCC 17. This document is an effort to identify common issues and provide solutions. Let us know if you have suggestions for improvements!

IA-32/x86-64 issues

Renamed AVX10.2 scalar saturating conversion intrinsics

The AVX10.2 scalar saturating conversion intrinsics were originally named with an _ep[i|u]{32,64} suffix. That suffix denotes packed elements, whereas these intrinsics convert a single scalar value and return a scalar integer, so the names did not follow the convention used by scalar conversion intrinsics since AVX-512F. The old names were never accepted by other x86 compilers. GCC 17 renames them to use the _[i|u]{32,64} suffix, with _si{32,64} aliases for the signed variants:

Removed in GCC 17 Use instead
_mm_cvtts_sd_epi32 _mm_cvtts_sd_i32, _mm_cvtts_sd_si32
_mm_cvtts_sd_epu32 _mm_cvtts_sd_u32
_mm_cvtts_ss_epi32 _mm_cvtts_ss_i32, _mm_cvtts_ss_si32
_mm_cvtts_ss_epu32 _mm_cvtts_ss_u32
_mm_cvtts_roundsd_epi32 _mm_cvtts_roundsd_i32, _mm_cvtts_roundsd_si32
_mm_cvtts_roundsd_epu32 _mm_cvtts_roundsd_u32
_mm_cvtts_roundss_epi32 _mm_cvtts_roundss_i32, _mm_cvtts_roundss_si32
_mm_cvtts_roundss_epu32 _mm_cvtts_roundss_u32
_mm_cvtts_sd_epi64 _mm_cvtts_sd_i64, _mm_cvtts_sd_si64
_mm_cvtts_sd_epu64 _mm_cvtts_sd_u64
_mm_cvtts_ss_epi64 _mm_cvtts_ss_i64, _mm_cvtts_ss_si64
_mm_cvtts_ss_epu64 _mm_cvtts_ss_u64
_mm_cvtts_roundsd_epi64 _mm_cvtts_roundsd_i64, _mm_cvtts_roundsd_si64
_mm_cvtts_roundsd_epu64 _mm_cvtts_roundsd_u64
_mm_cvtts_roundss_epi64 _mm_cvtts_roundss_i64, _mm_cvtts_roundss_si64
_mm_cvtts_roundss_epu64 _mm_cvtts_roundss_u64

The old names are still accepted on the GCC 15 and GCC 16 release branches.