Re: [PATCH] i386: Keep _ep[i|u]{32,64} names of scalar SAT CVT intrinsics [PR126581]

Jakub Jelinek <[email protected]> Mon, 3 Aug 2026 10:01:15 +0200
Newsgroups gmane.comp.gcc.patches
Message-ID <anBKy8oyYAUULBNj@tucnak>
On Mon, Aug 03, 2026 at 09:44:28AM +0200, Richard Biener wrote:
> On Mon, Aug 3, 2026 at 9:41 AM Jakub Jelinek <[email protected]> wrote:
> >
> > On Mon, Aug 03, 2026 at 07:38:19AM +0000, Liu, Hongtao wrote:
> > > > This doesn't help programmers migrate to the new names.
> > > > The same source which compiles fine for GCC 16 may fail for GCC 17.
> > >
> > > I prefer to document this change in changs.html for clarification but not support alias of them forever, those names are typo, not supported by LLVM/ICX.
> > > We believe users are unlikely to use these misspelled intrinsics either, as they are not portable across different x86 compilers (e.g., LLVM, ICX).
> >
> > Agreed.  For GCC 17 changes.html/porting_to.html is IMHO sufficient.
> 
> Do we have a mechanism to diagnose use of the misspelled alias?  Does
> attributing the functions with __attribute__((deprecated)) work and would that
> be a good idea?

Well, we have the normal Damerau-Levenshtein distance misspelling.
It doesn't suggest the new names though as the PR126581 shows,
error: implicit declaration of function ‘_mm_cvtts_ss_epu32’; did you mean ‘_mm_cvtts_ps_epu32’? [-Wimplicit-function-declaration]
instead of suggesting _mm_cvtts_ss_i32 or _mm_cvtts_ss_si32.

If the old names are kept as aliases with deprecated attribute, then
the misspelling wouldn't be reported as implicit declaration with
a suggestion, but as whatever we write in the argument to
the deprecated attribute.

Yet another option is to use unavailable attribute, then it doesn't
have to be even defined, just declared, so just
extern int
__attribute__ ((__unavailable__ ("_mm_cvtts_sd_epi32 has been renamed to _mm_cvtts_sd_si32")))
_mm_cvtts_sd_epi32 (__m128d);
(regardless of __OPTIMIZE__).

	Jakub