From: Hu, Lin1 Date: Wed, 22 Jul 2026 08:11:22 +0000 (+0800) Subject: i386: Update Suffix for AVX10.2 SAT CVT scalar Intrinsics X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=46ef72e150b7ecee62d193a5382547f3b3cfebca;p=thirdparty%2Fgcc.git i386: Update Suffix for AVX10.2 SAT CVT scalar Intrinsics The previous _ep[i|u]{32,64} suffix for scalar SAT CVT intrinsics does not match the intrinsic naming convention: scalar convert intrinsics have used _[i|u]{32,64} (with _si{32,64} aliases for signed variants) since AVX-512F, so the AVX10.2 scalar SAT CVT names need to follow the same convention. This patch renames the scalar SAT CVT intrinsics to use _[i|u]{32,64} suffix and provides _si{32,64} aliases for the signed intrinsics. gcc/ChangeLog: * config/i386/avx10_2satcvtintrin.h (_mm_cvtts_sd_i32): Renamed from _mm_cvtts_sd_epi32. (_mm_cvtts_sd_si32): New alias of _mm_cvtts_sd_i32. (_mm_cvtts_sd_u32): Renamed from _mm_cvtts_sd_epu32. (_mm_cvtts_ss_i32): Renamed from _mm_cvtts_ss_epi32. (_mm_cvtts_ss_si32): New alias of _mm_cvtts_ss_i32. (_mm_cvtts_ss_u32): Renamed from _mm_cvtts_ss_epu32. (_mm_cvtts_roundsd_i32): Renamed from _mm_cvtts_roundsd_epi32. (_mm_cvtts_roundsd_si32): New alias of _mm_cvtts_roundsd_i32. (_mm_cvtts_roundsd_u32): Renamed from _mm_cvtts_roundsd_epu32. (_mm_cvtts_roundss_i32): Renamed from _mm_cvtts_roundss_epi32. (_mm_cvtts_roundss_si32): New alias of _mm_cvtts_roundss_i32. (_mm_cvtts_roundss_u32): Renamed from _mm_cvtts_roundss_epu32. (_mm_cvtts_sd_i64): Renamed from _mm_cvtts_sd_epi64. (_mm_cvtts_sd_si64): New alias of _mm_cvtts_sd_i64. (_mm_cvtts_sd_u64): Renamed from _mm_cvtts_sd_epu64. (_mm_cvtts_ss_i64): Renamed from _mm_cvtts_ss_epi64. (_mm_cvtts_ss_si64): New alias of _mm_cvtts_ss_i64. (_mm_cvtts_ss_u64): Renamed from _mm_cvtts_ss_epu64. (_mm_cvtts_roundsd_i64): Renamed from _mm_cvtts_roundsd_epi64. (_mm_cvtts_roundsd_si64): New alias of _mm_cvtts_roundsd_i64. (_mm_cvtts_roundsd_u64): Renamed from _mm_cvtts_roundsd_epu64. (_mm_cvtts_roundss_i64): Renamed from _mm_cvtts_roundss_epi64. (_mm_cvtts_roundss_si64): New alias of _mm_cvtts_roundss_i64. (_mm_cvtts_roundss_u64): Renamed from _mm_cvtts_roundss_epu64. gcc/testsuite/ChangeLog: * gcc.target/i386/avx10_2-satcvt-1.c: Update intrin names and add _si alias tests. * gcc.target/i386/sse-14.c: Ditto. * gcc.target/i386/sse-22.c: Ditto. * gcc.target/i386/avx10_2-vcvttsd2sis-2.c: Update intrin names. * gcc.target/i386/avx10_2-vcvttsd2usis-2.c: Ditto. * gcc.target/i386/avx10_2-vcvttss2sis-2.c: Ditto. * gcc.target/i386/avx10_2-vcvttss2usis-2.c: Ditto. * gcc.target/i386/zext-avx10-1.c: Ditto. --- diff --git a/gcc/config/i386/avx10_2satcvtintrin.h b/gcc/config/i386/avx10_2satcvtintrin.h index 3b47d5491ab..f202ec862c9 100644 --- a/gcc/config/i386/avx10_2satcvtintrin.h +++ b/gcc/config/i386/avx10_2satcvtintrin.h @@ -2769,7 +2769,15 @@ _mm512_maskz_cvtts_roundps_epu64 (__mmask8 __U, __m256 __A, const int __R) extern __inline int __attribute__ ((__gnu_inline__, __always_inline__, __artificial__)) -_mm_cvtts_sd_epi32 (__m128d __A) +_mm_cvtts_sd_i32 (__m128d __A) +{ + return (int) __builtin_ia32_cvttsd2sis32_round ((__v2df) __A, + _MM_FROUND_CUR_DIRECTION); +} + +extern __inline int +__attribute__ ((__gnu_inline__, __always_inline__, __artificial__)) +_mm_cvtts_sd_si32 (__m128d __A) { return (int) __builtin_ia32_cvttsd2sis32_round ((__v2df) __A, _MM_FROUND_CUR_DIRECTION); @@ -2777,7 +2785,7 @@ _mm_cvtts_sd_epi32 (__m128d __A) extern __inline unsigned int __attribute__ ((__gnu_inline__, __always_inline__, __artificial__)) -_mm_cvtts_sd_epu32 (__m128d __A) +_mm_cvtts_sd_u32 (__m128d __A) { return (unsigned int) __builtin_ia32_cvttsd2usis32_round ((__v2df) __A, _MM_FROUND_CUR_DIRECTION); @@ -2785,7 +2793,15 @@ _mm_cvtts_sd_epu32 (__m128d __A) extern __inline int __attribute__ ((__gnu_inline__, __always_inline__, __artificial__)) -_mm_cvtts_ss_epi32 (__m128 __A) +_mm_cvtts_ss_i32 (__m128 __A) +{ + return (int) __builtin_ia32_cvttss2sis32_round ((__v4sf) __A, + _MM_FROUND_CUR_DIRECTION); +} + +extern __inline int +__attribute__ ((__gnu_inline__, __always_inline__, __artificial__)) +_mm_cvtts_ss_si32 (__m128 __A) { return (int) __builtin_ia32_cvttss2sis32_round ((__v4sf) __A, _MM_FROUND_CUR_DIRECTION); @@ -2793,7 +2809,7 @@ _mm_cvtts_ss_epi32 (__m128 __A) extern __inline unsigned int __attribute__ ((__gnu_inline__, __always_inline__, __artificial__)) -_mm_cvtts_ss_epu32 (__m128 __A) +_mm_cvtts_ss_u32 (__m128 __A) { return (unsigned int) __builtin_ia32_cvttss2usis32_round ((__v4sf) __A, _MM_FROUND_CUR_DIRECTION); @@ -2802,7 +2818,15 @@ _mm_cvtts_ss_epu32 (__m128 __A) #ifdef __OPTIMIZE__ extern __inline int __attribute__ ((__gnu_inline__, __always_inline__, __artificial__)) -_mm_cvtts_roundsd_epi32 (__m128d __A, const int __R) +_mm_cvtts_roundsd_i32 (__m128d __A, const int __R) +{ + return (int) __builtin_ia32_cvttsd2sis32_round ((__v2df) __A, + __R); +} + +extern __inline int +__attribute__ ((__gnu_inline__, __always_inline__, __artificial__)) +_mm_cvtts_roundsd_si32 (__m128d __A, const int __R) { return (int) __builtin_ia32_cvttsd2sis32_round ((__v2df) __A, __R); @@ -2810,7 +2834,7 @@ _mm_cvtts_roundsd_epi32 (__m128d __A, const int __R) extern __inline unsigned int __attribute__ ((__gnu_inline__, __always_inline__, __artificial__)) -_mm_cvtts_roundsd_epu32 (__m128d __A, const int __R) +_mm_cvtts_roundsd_u32 (__m128d __A, const int __R) { return (unsigned int) __builtin_ia32_cvttsd2usis32_round ((__v2df) __A, __R); @@ -2818,7 +2842,15 @@ _mm_cvtts_roundsd_epu32 (__m128d __A, const int __R) extern __inline int __attribute__ ((__gnu_inline__, __always_inline__, __artificial__)) -_mm_cvtts_roundss_epi32 (__m128 __A, const int __R) +_mm_cvtts_roundss_i32 (__m128 __A, const int __R) +{ + return (int) __builtin_ia32_cvttss2sis32_round ((__v4sf) __A, + __R); +} + +extern __inline int +__attribute__ ((__gnu_inline__, __always_inline__, __artificial__)) +_mm_cvtts_roundss_si32 (__m128 __A, const int __R) { return (int) __builtin_ia32_cvttss2sis32_round ((__v4sf) __A, __R); @@ -2826,25 +2858,33 @@ _mm_cvtts_roundss_epi32 (__m128 __A, const int __R) extern __inline unsigned int __attribute__ ((__gnu_inline__, __always_inline__, __artificial__)) -_mm_cvtts_roundss_epu32 (__m128 __A, const int __R) +_mm_cvtts_roundss_u32 (__m128 __A, const int __R) { return (unsigned int) __builtin_ia32_cvttss2usis32_round ((__v4sf) __A, __R); } #else -#define _mm_cvtts_roundsd_epi32(A, R) \ +#define _mm_cvtts_roundsd_i32(A, R) \ + ((int) __builtin_ia32_cvttsd2sis32_round ((__v2df) (A), \ + (R))) + +#define _mm_cvtts_roundsd_si32(A, R) \ ((int) __builtin_ia32_cvttsd2sis32_round ((__v2df) (A), \ (R))) -#define _mm_cvtts_roundsd_epu32(A, R) \ +#define _mm_cvtts_roundsd_u32(A, R) \ ((unsigned int) __builtin_ia32_cvttsd2usis32_round ((__v2df) (A), \ (R))) -#define _mm_cvtts_roundss_epi32(A, R) \ +#define _mm_cvtts_roundss_i32(A, R) \ + ((int) __builtin_ia32_cvttss2sis32_round ((__v4sf) (A), \ + (R))) + +#define _mm_cvtts_roundss_si32(A, R) \ ((int) __builtin_ia32_cvttss2sis32_round ((__v4sf) (A), \ (R))) -#define _mm_cvtts_roundss_epu32(A, R) \ +#define _mm_cvtts_roundss_u32(A, R) \ ((unsigned int) __builtin_ia32_cvttss2usis32_round ((__v4sf) (A), \ (R))) #endif @@ -2852,7 +2892,15 @@ _mm_cvtts_roundss_epu32 (__m128 __A, const int __R) #ifdef __x86_64__ extern __inline long long __attribute__ ((__gnu_inline__, __always_inline__, __artificial__)) -_mm_cvtts_sd_epi64 (__m128d __A) +_mm_cvtts_sd_i64 (__m128d __A) +{ + return (long long) __builtin_ia32_cvttsd2sis64_round ((__v2df) __A, + _MM_FROUND_CUR_DIRECTION); +} + +extern __inline long long +__attribute__ ((__gnu_inline__, __always_inline__, __artificial__)) +_mm_cvtts_sd_si64 (__m128d __A) { return (long long) __builtin_ia32_cvttsd2sis64_round ((__v2df) __A, _MM_FROUND_CUR_DIRECTION); @@ -2860,7 +2908,7 @@ _mm_cvtts_sd_epi64 (__m128d __A) extern __inline unsigned long long __attribute__ ((__gnu_inline__, __always_inline__, __artificial__)) -_mm_cvtts_sd_epu64 (__m128d __A) +_mm_cvtts_sd_u64 (__m128d __A) { return (unsigned long long) __builtin_ia32_cvttsd2usis64_round ((__v2df) __A, _MM_FROUND_CUR_DIRECTION); @@ -2868,16 +2916,23 @@ _mm_cvtts_sd_epu64 (__m128d __A) extern __inline long long __attribute__ ((__gnu_inline__, __always_inline__, __artificial__)) -_mm_cvtts_ss_epi64 (__m128 __A) +_mm_cvtts_ss_i64 (__m128 __A) { return (long long) __builtin_ia32_cvttss2sis64_round ((__v4sf) __A, _MM_FROUND_CUR_DIRECTION); } +extern __inline long long +__attribute__ ((__gnu_inline__, __always_inline__, __artificial__)) +_mm_cvtts_ss_si64 (__m128 __A) +{ + return (long long) __builtin_ia32_cvttss2sis64_round ((__v4sf) __A, + _MM_FROUND_CUR_DIRECTION); +} extern __inline unsigned long long __attribute__ ((__gnu_inline__, __always_inline__, __artificial__)) -_mm_cvtts_ss_epu64 (__m128 __A) +_mm_cvtts_ss_u64 (__m128 __A) { return (unsigned long long) __builtin_ia32_cvttss2usis64_round ((__v4sf) __A, _MM_FROUND_CUR_DIRECTION); @@ -2886,7 +2941,15 @@ _mm_cvtts_ss_epu64 (__m128 __A) #ifdef __OPTIMIZE__ extern __inline long long __attribute__ ((__gnu_inline__, __always_inline__, __artificial__)) -_mm_cvtts_roundsd_epi64 (__m128d __A, const int __R) +_mm_cvtts_roundsd_i64 (__m128d __A, const int __R) +{ + return (long long) __builtin_ia32_cvttsd2sis64_round ((__v2df) __A, + __R); +} + +extern __inline long long +__attribute__ ((__gnu_inline__, __always_inline__, __artificial__)) +_mm_cvtts_roundsd_si64 (__m128d __A, const int __R) { return (long long) __builtin_ia32_cvttsd2sis64_round ((__v2df) __A, __R); @@ -2894,7 +2957,7 @@ _mm_cvtts_roundsd_epi64 (__m128d __A, const int __R) extern __inline unsigned long long __attribute__ ((__gnu_inline__, __always_inline__, __artificial__)) -_mm_cvtts_roundsd_epu64 (__m128d __A, const int __R) +_mm_cvtts_roundsd_u64 (__m128d __A, const int __R) { return (unsigned long long) __builtin_ia32_cvttsd2usis64_round ((__v2df) __A, __R); @@ -2902,7 +2965,15 @@ _mm_cvtts_roundsd_epu64 (__m128d __A, const int __R) extern __inline long long __attribute__ ((__gnu_inline__, __always_inline__, __artificial__)) -_mm_cvtts_roundss_epi64 (__m128 __A, const int __R) +_mm_cvtts_roundss_i64 (__m128 __A, const int __R) +{ + return (long long) __builtin_ia32_cvttss2sis64_round ((__v4sf) __A, + __R); +} + +extern __inline long long +__attribute__ ((__gnu_inline__, __always_inline__, __artificial__)) +_mm_cvtts_roundss_si64 (__m128 __A, const int __R) { return (long long) __builtin_ia32_cvttss2sis64_round ((__v4sf) __A, __R); @@ -2910,25 +2981,33 @@ _mm_cvtts_roundss_epi64 (__m128 __A, const int __R) extern __inline unsigned long long __attribute__ ((__gnu_inline__, __always_inline__, __artificial__)) -_mm_cvtts_roundss_epu64 (__m128 __A, const int __R) +_mm_cvtts_roundss_u64 (__m128 __A, const int __R) { return (unsigned long long) __builtin_ia32_cvttss2usis64_round ((__v4sf) __A, __R); } #else -#define _mm_cvtts_roundsd_epi64(A, R) \ +#define _mm_cvtts_roundsd_i64(A, R) \ + ((long long) __builtin_ia32_cvttsd2sis64_round ((__v2df) (A), \ + (R))) + +#define _mm_cvtts_roundsd_si64(A, R) \ ((long long) __builtin_ia32_cvttsd2sis64_round ((__v2df) (A), \ (R))) -#define _mm_cvtts_roundsd_epu64(A, R) \ +#define _mm_cvtts_roundsd_u64(A, R) \ ((unsigned long long) __builtin_ia32_cvttsd2usis64_round ((__v2df) (A), \ (R))) -#define _mm_cvtts_roundss_epi64(A, R) \ +#define _mm_cvtts_roundss_i64(A, R) \ + ((long long) __builtin_ia32_cvttss2sis64_round ((__v4sf) (A), \ + (R))) + +#define _mm_cvtts_roundss_si64(A, R) \ ((long long) __builtin_ia32_cvttss2sis64_round ((__v4sf) (A), \ (R))) -#define _mm_cvtts_roundss_epu64(A, R) \ +#define _mm_cvtts_roundss_u64(A, R) \ ((unsigned long long) __builtin_ia32_cvttss2usis64_round ((__v4sf) (A), \ (R))) #endif diff --git a/gcc/testsuite/gcc.target/i386/avx10_2-satcvt-1.c b/gcc/testsuite/gcc.target/i386/avx10_2-satcvt-1.c index 9f3acb066d7..717ccd2b5ae 100644 --- a/gcc/testsuite/gcc.target/i386/avx10_2-satcvt-1.c +++ b/gcc/testsuite/gcc.target/i386/avx10_2-satcvt-1.c @@ -220,21 +220,21 @@ /* { dg-final { scan-assembler-times "vcvttps2uqqs\[ \\t\]+\[^\{\n\]*%xmm\[0-9\]+\[^\n\r]*%xmm\[0-9\]+(?:\n|\[ \\t\]+#)" 1 } } */ /* { dg-final { scan-assembler-times "vcvttps2uqqs\[ \\t\]+\[^\{\n\]*%xmm\[0-9\]+\[^\n\r]*%xmm\[0-9\]+\{%k\[0-9\]\}(?:\n|\[ \\t\]+#)" 1 } } */ /* { dg-final { scan-assembler-times "vcvttps2uqqs\[ \\t\]+\[^\{\n\]*%xmm\[0-9\]+\[^\n\r]*%xmm\[0-9\]+\{%k\[0-9\]\}\{z\}(?:\n|\[ \\t\]+#)" 1 } } */ -/* { dg-final { scan-assembler-times "vcvttsd2sis\[ \\t\]+\[^\{\n\]*%xmm\[0-9\]+\[^\n\r]*%e.x+(?:\n|\[ \\t\]+#)" 1 } } */ +/* { dg-final { scan-assembler-times "vcvttsd2sis\[ \\t\]+\[^\{\n\]*%xmm\[0-9\]+\[^\n\r]*%e.x+(?:\n|\[ \\t\]+#)" 2 } } */ /* { dg-final { scan-assembler-times "vcvttsd2usis\[ \\t\]+\[^\{\n\]*%xmm\[0-9\]+\[^\n\r]*%e.x+(?:\n|\[ \\t\]+#)" 1 } } */ -/* { dg-final { scan-assembler-times "vcvttss2sis\[ \\t\]+\[^\{\n\]*%xmm\[0-9\]+\[^\n\r]*%e.x+(?:\n|\[ \\t\]+#)" 1 } } */ +/* { dg-final { scan-assembler-times "vcvttss2sis\[ \\t\]+\[^\{\n\]*%xmm\[0-9\]+\[^\n\r]*%e.x+(?:\n|\[ \\t\]+#)" 2 } } */ /* { dg-final { scan-assembler-times "vcvttss2usis\[ \\t\]+\[^\{\n\]*%xmm\[0-9\]+\[^\n\r]*%e.x+(?:\n|\[ \\t\]+#)" 1 } } */ -/* { dg-final { scan-assembler-times "vcvttsd2sis\[ \\t\]+\{sae\}\[^\{\n\]*%xmm\[0-9\]+\[^\n\r]*%e.x+(?:\n|\[ \\t\]+#)" 1 } } */ +/* { dg-final { scan-assembler-times "vcvttsd2sis\[ \\t\]+\{sae\}\[^\{\n\]*%xmm\[0-9\]+\[^\n\r]*%e.x+(?:\n|\[ \\t\]+#)" 2 } } */ /* { dg-final { scan-assembler-times "vcvttsd2usis\[ \\t\]+\{sae\}\[^\{\n\]*%xmm\[0-9\]+\[^\n\r]*%e.x+(?:\n|\[ \\t\]+#)" 1 } } */ -/* { dg-final { scan-assembler-times "vcvttss2sis\[ \\t\]+\{sae\}\[^\{\n\]*%xmm\[0-9\]+\[^\n\r]*%e.x+(?:\n|\[ \\t\]+#)" 1 } } */ +/* { dg-final { scan-assembler-times "vcvttss2sis\[ \\t\]+\{sae\}\[^\{\n\]*%xmm\[0-9\]+\[^\n\r]*%e.x+(?:\n|\[ \\t\]+#)" 2 } } */ /* { dg-final { scan-assembler-times "vcvttss2usis\[ \\t\]+\{sae\}\[^\{\n\]*%xmm\[0-9\]+\[^\n\r]*%e.x+(?:\n|\[ \\t\]+#)" 1 } } */ -/* { dg-final { scan-assembler-times "vcvttsd2sis\[ \\t\]+\[^\{\n\]*%xmm\[0-9\]+\[^\n\r]*%r.x+(?:\n|\[ \\t\]+#)" 1 { target { ! ia32 } } } } */ +/* { dg-final { scan-assembler-times "vcvttsd2sis\[ \\t\]+\[^\{\n\]*%xmm\[0-9\]+\[^\n\r]*%r.x+(?:\n|\[ \\t\]+#)" 2 { target { ! ia32 } } } } */ /* { dg-final { scan-assembler-times "vcvttsd2usis\[ \\t\]+\[^\{\n\]*%xmm\[0-9\]+\[^\n\r]*%r.x+(?:\n|\[ \\t\]+#)" 1 { target { ! ia32 } } } } */ -/* { dg-final { scan-assembler-times "vcvttss2sis\[ \\t\]+\[^\{\n\]*%xmm\[0-9\]+\[^\n\r]*%r.x+(?:\n|\[ \\t\]+#)" 1 { target { ! ia32 } } } } */ +/* { dg-final { scan-assembler-times "vcvttss2sis\[ \\t\]+\[^\{\n\]*%xmm\[0-9\]+\[^\n\r]*%r.x+(?:\n|\[ \\t\]+#)" 2 { target { ! ia32 } } } } */ /* { dg-final { scan-assembler-times "vcvttss2usis\[ \\t\]+\[^\{\n\]*%xmm\[0-9\]+\[^\n\r]*%r.x+(?:\n|\[ \\t\]+#)" 1 { target { ! ia32 } } } } */ -/* { dg-final { scan-assembler-times "vcvttsd2sis\[ \\t\]+\{sae\}\[^\{\n\]*%xmm\[0-9\]+\[^\n\r]*%r.x+(?:\n|\[ \\t\]+#)" 1 { target { ! ia32 } } } } */ +/* { dg-final { scan-assembler-times "vcvttsd2sis\[ \\t\]+\{sae\}\[^\{\n\]*%xmm\[0-9\]+\[^\n\r]*%r.x+(?:\n|\[ \\t\]+#)" 2 { target { ! ia32 } } } } */ /* { dg-final { scan-assembler-times "vcvttsd2usis\[ \\t\]+\{sae\}\[^\{\n\]*%xmm\[0-9\]+\[^\n\r]*%r.x+(?:\n|\[ \\t\]+#)" 1 { target { ! ia32 } } } } */ -/* { dg-final { scan-assembler-times "vcvttss2sis\[ \\t\]+\{sae\}\[^\{\n\]*%xmm\[0-9\]+\[^\n\r]*%r.x+(?:\n|\[ \\t\]+#)" 1 { target { ! ia32 } } } } */ +/* { dg-final { scan-assembler-times "vcvttss2sis\[ \\t\]+\{sae\}\[^\{\n\]*%xmm\[0-9\]+\[^\n\r]*%r.x+(?:\n|\[ \\t\]+#)" 2 { target { ! ia32 } } } } */ /* { dg-final { scan-assembler-times "vcvttss2usis\[ \\t\]+\{sae\}\[^\{\n\]*%xmm\[0-9\]+\[^\n\r]*%r.x+(?:\n|\[ \\t\]+#)" 1 { target { ! ia32 } } } } */ #include @@ -553,23 +553,31 @@ avx10_2_test (void) hxi = _mm_mask_cvtts_ps_epu64 (hxi, m8, hx); hxi = _mm_maskz_cvtts_ps_epu64 (m8, hx); - i = _mm_cvtts_sd_epi32 (hxd); - ui = _mm_cvtts_sd_epu32 (hxd); - i = _mm_cvtts_ss_epi32 (hx); - ui = _mm_cvtts_ss_epu32 (hx); - i = _mm_cvtts_roundsd_epi32 (hxd, 8); - ui = _mm_cvtts_roundsd_epu32 (hxd, 8); - i = _mm_cvtts_roundss_epi32 (hx, 8); - ui = _mm_cvtts_roundss_epu32 (hx, 8); + i = _mm_cvtts_sd_i32 (hxd); + i = _mm_cvtts_sd_si32 (hxd); + ui = _mm_cvtts_sd_u32 (hxd); + i = _mm_cvtts_ss_i32 (hx); + i = _mm_cvtts_ss_si32 (hx); + ui = _mm_cvtts_ss_u32 (hx); + i = _mm_cvtts_roundsd_i32 (hxd, 8); + i = _mm_cvtts_roundsd_si32 (hxd, 8); + ui = _mm_cvtts_roundsd_u32 (hxd, 8); + i = _mm_cvtts_roundss_i32 (hx, 8); + i = _mm_cvtts_roundss_si32 (hx, 8); + ui = _mm_cvtts_roundss_u32 (hx, 8); #ifdef __x86_64__ - ll = _mm_cvtts_sd_epi64 (hxd); - ull = _mm_cvtts_sd_epu64 (hxd); - ll = _mm_cvtts_ss_epi64 (hx); - ull = _mm_cvtts_ss_epu64 (hx); - ll = _mm_cvtts_roundsd_epi64 (hxd, 8); - ull = _mm_cvtts_roundsd_epu64 (hxd, 8); - ll = _mm_cvtts_roundss_epi64 (hx, 8); - ull = _mm_cvtts_roundss_epu64 (hx, 8); + ll = _mm_cvtts_sd_i64 (hxd); + ll = _mm_cvtts_sd_si64 (hxd); + ull = _mm_cvtts_sd_u64 (hxd); + ll = _mm_cvtts_ss_i64 (hx); + ll = _mm_cvtts_ss_si64 (hx); + ull = _mm_cvtts_ss_u64 (hx); + ll = _mm_cvtts_roundsd_i64 (hxd, 8); + ll = _mm_cvtts_roundsd_si64 (hxd, 8); + ull = _mm_cvtts_roundsd_u64 (hxd, 8); + ll = _mm_cvtts_roundss_i64 (hx, 8); + ll = _mm_cvtts_roundss_si64 (hx, 8); + ull = _mm_cvtts_roundss_u64 (hx, 8); #endif } diff --git a/gcc/testsuite/gcc.target/i386/avx10_2-vcvttsd2sis-2.c b/gcc/testsuite/gcc.target/i386/avx10_2-vcvttsd2sis-2.c index 8069497d1e6..11c7c89437d 100644 --- a/gcc/testsuite/gcc.target/i386/avx10_2-vcvttsd2sis-2.c +++ b/gcc/testsuite/gcc.target/i386/avx10_2-vcvttsd2sis-2.c @@ -19,7 +19,7 @@ TEST (void) s.a[0] = 2.46; - res1 = _mm_cvtts_roundsd_epi32 (s.x, 8); + res1 = _mm_cvtts_roundsd_i32 (s.x, 8); if (s.a[0] > INT_MAX) res1_ref = INT_MAX; @@ -31,7 +31,7 @@ TEST (void) if (res1 != res1_ref) abort(); - res1 = _mm_cvtts_sd_epi32 (s.x); + res1 = _mm_cvtts_sd_i32 (s.x); if (s.a[0] > INT_MAX) res1_ref = INT_MAX; @@ -44,7 +44,7 @@ TEST (void) abort(); #ifdef __x86_64__ - res2 = _mm_cvtts_roundsd_epi64 (s.x, 8); + res2 = _mm_cvtts_roundsd_i64 (s.x, 8); if (s.a[0] > LLONG_MAX) res2_ref = LLONG_MAX; @@ -56,7 +56,7 @@ TEST (void) if (res2 != res2_ref) abort(); - res2 = _mm_cvtts_sd_epi64 (s.x); + res2 = _mm_cvtts_sd_i64 (s.x); if (s.a[0] > LLONG_MAX) res2_ref = LLONG_MAX; diff --git a/gcc/testsuite/gcc.target/i386/avx10_2-vcvttsd2usis-2.c b/gcc/testsuite/gcc.target/i386/avx10_2-vcvttsd2usis-2.c index e2b18d6bb00..615428860eb 100644 --- a/gcc/testsuite/gcc.target/i386/avx10_2-vcvttsd2usis-2.c +++ b/gcc/testsuite/gcc.target/i386/avx10_2-vcvttsd2usis-2.c @@ -19,7 +19,7 @@ TEST (void) s.a[0] = 2.46; - res1 = _mm_cvtts_roundsd_epu32 (s.x, 8); + res1 = _mm_cvtts_roundsd_u32 (s.x, 8); if (s.a[0] > UINT_MAX) res1_ref = UINT_MAX; @@ -31,7 +31,7 @@ TEST (void) if (res1 != res1_ref) abort(); - res1 = _mm_cvtts_sd_epu32 (s.x); + res1 = _mm_cvtts_sd_u32 (s.x); if (s.a[0] > UINT_MAX) res1_ref = UINT_MAX; @@ -44,7 +44,7 @@ TEST (void) abort(); #ifdef __x86_64__ - res2 = _mm_cvtts_roundsd_epu64 (s.x, 8); + res2 = _mm_cvtts_roundsd_u64 (s.x, 8); if (s.a[0] > ULONG_MAX) res2_ref = ULONG_MAX; @@ -56,7 +56,7 @@ TEST (void) if (res2 != res2_ref) abort(); - res2 = _mm_cvtts_sd_epu64 (s.x); + res2 = _mm_cvtts_sd_u64 (s.x); if (s.a[0] > ULONG_MAX) res2_ref = ULONG_MAX; diff --git a/gcc/testsuite/gcc.target/i386/avx10_2-vcvttss2sis-2.c b/gcc/testsuite/gcc.target/i386/avx10_2-vcvttss2sis-2.c index 82db8efc1f6..e3290000c90 100644 --- a/gcc/testsuite/gcc.target/i386/avx10_2-vcvttss2sis-2.c +++ b/gcc/testsuite/gcc.target/i386/avx10_2-vcvttss2sis-2.c @@ -19,7 +19,7 @@ TEST (void) s.a[0] = 2.46; - res1 = _mm_cvtts_roundss_epi32 (s.x, 8); + res1 = _mm_cvtts_roundss_i32 (s.x, 8); if (s.a[0] > INT_MAX) res1_ref = INT_MAX; @@ -31,7 +31,7 @@ TEST (void) if (res1 != res1_ref) abort(); - res1 = _mm_cvtts_ss_epi32 (s.x); + res1 = _mm_cvtts_ss_i32 (s.x); if (s.a[0] > INT_MAX) res1_ref = INT_MAX; @@ -44,7 +44,7 @@ TEST (void) abort(); #ifdef __x86_64__ - res2 = _mm_cvtts_roundss_epi64 (s.x, 8); + res2 = _mm_cvtts_roundss_i64 (s.x, 8); if (s.a[0] > LLONG_MAX) res2_ref = LLONG_MAX; @@ -56,7 +56,7 @@ TEST (void) if (res2 != res2_ref) abort(); - res2 = _mm_cvtts_ss_epi64 (s.x); + res2 = _mm_cvtts_ss_i64 (s.x); if (s.a[0] > LLONG_MAX) res2_ref = LLONG_MAX; diff --git a/gcc/testsuite/gcc.target/i386/avx10_2-vcvttss2usis-2.c b/gcc/testsuite/gcc.target/i386/avx10_2-vcvttss2usis-2.c index c3d16ffec89..f428d059b86 100644 --- a/gcc/testsuite/gcc.target/i386/avx10_2-vcvttss2usis-2.c +++ b/gcc/testsuite/gcc.target/i386/avx10_2-vcvttss2usis-2.c @@ -18,7 +18,7 @@ TEST (void) s.a[0] = 2.46; - res1 = _mm_cvtts_roundss_epu32 (s.x, 8); + res1 = _mm_cvtts_roundss_u32 (s.x, 8); if (s.a[0] > UINT_MAX) res1_ref = UINT_MAX; @@ -30,7 +30,7 @@ TEST (void) if (res1 != res1_ref) abort(); - res1 = _mm_cvtts_ss_epu32 (s.x); + res1 = _mm_cvtts_ss_u32 (s.x); if (s.a[0] > UINT_MAX) res1_ref = UINT_MAX; @@ -43,7 +43,7 @@ TEST (void) abort(); #ifdef __x86_64__ - res2 = _mm_cvtts_roundss_epu64 (s.x, 8); + res2 = _mm_cvtts_roundss_u64 (s.x, 8); if (s.a[0] > ULONG_MAX) res2_ref = ULONG_MAX; @@ -55,7 +55,7 @@ TEST (void) if (res2 != res2_ref) abort(); - res2 = _mm_cvtts_ss_epu64 (s.x); + res2 = _mm_cvtts_ss_u64 (s.x); if (s.a[0] > ULONG_MAX) res2_ref = ULONG_MAX; diff --git a/gcc/testsuite/gcc.target/i386/sse-14.c b/gcc/testsuite/gcc.target/i386/sse-14.c index c1053c892c0..84be5f939a9 100644 --- a/gcc/testsuite/gcc.target/i386/sse-14.c +++ b/gcc/testsuite/gcc.target/i386/sse-14.c @@ -1122,15 +1122,19 @@ test_3 (_mm512_mask_cvtts_roundps_epu32, __m512i, __m512i, __mmask16, __m512, 8) test_1 (_mm512_cvtts_roundps_epu64, __m512i, __m256, 8) test_2 (_mm512_maskz_cvtts_roundps_epu64, __m512i, __mmask8, __m256, 8) test_3 (_mm512_mask_cvtts_roundps_epu64, __m512i, __m512i, __mmask8, __m256, 8) -test_1 (_mm_cvtts_roundsd_epi32, int, __m128d, 8) -test_1 (_mm_cvtts_roundsd_epu32, unsigned int, __m128d, 8) -test_1 (_mm_cvtts_roundss_epi32, int, __m128, 8) -test_1 (_mm_cvtts_roundss_epu32, unsigned int, __m128, 8) +test_1 (_mm_cvtts_roundsd_i32, int, __m128d, 8) +test_1 (_mm_cvtts_roundsd_si32, int, __m128d, 8) +test_1 (_mm_cvtts_roundsd_u32, unsigned int, __m128d, 8) +test_1 (_mm_cvtts_roundss_i32, int, __m128, 8) +test_1 (_mm_cvtts_roundss_si32, int, __m128, 8) +test_1 (_mm_cvtts_roundss_u32, unsigned int, __m128, 8) #ifdef __x86_64__ -test_1 (_mm_cvtts_roundsd_epi64, long long, __m128d, 8) -test_1 (_mm_cvtts_roundsd_epu64, unsigned long long, __m128d, 8) -test_1 (_mm_cvtts_roundss_epi64, long long, __m128, 8) -test_1 (_mm_cvtts_roundss_epu64, unsigned long long, __m128, 8) +test_1 (_mm_cvtts_roundsd_i64, long long, __m128d, 8) +test_1 (_mm_cvtts_roundsd_si64, long long, __m128d, 8) +test_1 (_mm_cvtts_roundsd_u64, unsigned long long, __m128d, 8) +test_1 (_mm_cvtts_roundss_i64, long long, __m128, 8) +test_1 (_mm_cvtts_roundss_si64, long long, __m128, 8) +test_1 (_mm_cvtts_roundss_u64, unsigned long long, __m128, 8) #endif /* avx10_2minmaxintrin.h */ diff --git a/gcc/testsuite/gcc.target/i386/sse-22.c b/gcc/testsuite/gcc.target/i386/sse-22.c index 6b78f6f950f..dd725c0871a 100644 --- a/gcc/testsuite/gcc.target/i386/sse-22.c +++ b/gcc/testsuite/gcc.target/i386/sse-22.c @@ -1163,15 +1163,19 @@ test_3 (_mm512_mask_cvtts_roundps_epu32, __m512i, __m512i, __mmask16, __m512, 8) test_1 (_mm512_cvtts_roundps_epu64, __m512i, __m256, 8) test_2 (_mm512_maskz_cvtts_roundps_epu64, __m512i, __mmask8, __m256, 8) test_3 (_mm512_mask_cvtts_roundps_epu64, __m512i, __m512i, __mmask8, __m256, 8) -test_1 (_mm_cvtts_roundsd_epi32, int, __m128d, 8) -test_1 (_mm_cvtts_roundsd_epu32, unsigned int, __m128d, 8) -test_1 (_mm_cvtts_roundss_epi32, int, __m128, 8) -test_1 (_mm_cvtts_roundss_epu32, unsigned int, __m128, 8) +test_1 (_mm_cvtts_roundsd_i32, int, __m128d, 8) +test_1 (_mm_cvtts_roundsd_si32, int, __m128d, 8) +test_1 (_mm_cvtts_roundsd_u32, unsigned int, __m128d, 8) +test_1 (_mm_cvtts_roundss_i32, int, __m128, 8) +test_1 (_mm_cvtts_roundss_si32, int, __m128, 8) +test_1 (_mm_cvtts_roundss_u32, unsigned int, __m128, 8) #ifdef __x86_64__ -test_1 (_mm_cvtts_roundsd_epi64, long long, __m128d, 8) -test_1 (_mm_cvtts_roundsd_epu64, unsigned long long, __m128d, 8) -test_1 (_mm_cvtts_roundss_epi64, long long, __m128, 8) -test_1 (_mm_cvtts_roundss_epu64, unsigned long long, __m128, 8) +test_1 (_mm_cvtts_roundsd_i64, long long, __m128d, 8) +test_1 (_mm_cvtts_roundsd_si64, long long, __m128d, 8) +test_1 (_mm_cvtts_roundsd_u64, unsigned long long, __m128d, 8) +test_1 (_mm_cvtts_roundss_i64, long long, __m128, 8) +test_1 (_mm_cvtts_roundss_si64, long long, __m128, 8) +test_1 (_mm_cvtts_roundss_u64, unsigned long long, __m128, 8) #endif /* avx10_2minmaxintrin.h */ diff --git a/gcc/testsuite/gcc.target/i386/zext-avx10-1.c b/gcc/testsuite/gcc.target/i386/zext-avx10-1.c index 66f28125fff..087e1ca8709 100644 --- a/gcc/testsuite/gcc.target/i386/zext-avx10-1.c +++ b/gcc/testsuite/gcc.target/i386/zext-avx10-1.c @@ -19,7 +19,7 @@ unsigned long long func1 (__m128 x) { - return _mm_cvtts_ss_epu32 (x); + return _mm_cvtts_ss_u32 (x); } /* @@ -35,7 +35,7 @@ func1 (__m128 x) unsigned long long func2 (__m128 x) { - return _mm_cvtts_roundss_epu32 + return _mm_cvtts_roundss_u32 (x, _MM_FROUND_TO_NEAREST_INT | _MM_FROUND_NO_EXC); } @@ -52,7 +52,7 @@ func2 (__m128 x) unsigned long long func3 (__m128 x) { - return (unsigned int) _mm_cvtts_ss_epi32 (x); + return (unsigned int) _mm_cvtts_ss_i32 (x); } /* @@ -68,7 +68,7 @@ func3 (__m128 x) unsigned long long func4 (__m128 x) { - return (unsigned int) _mm_cvtts_roundss_epi32 + return (unsigned int) _mm_cvtts_roundss_i32 (x, _MM_FROUND_TO_NEAREST_INT | _MM_FROUND_NO_EXC); } @@ -85,7 +85,7 @@ func4 (__m128 x) unsigned long long func5 (__m128d x) { - return _mm_cvtts_sd_epu32 (x); + return _mm_cvtts_sd_u32 (x); } /* @@ -101,7 +101,7 @@ func5 (__m128d x) unsigned long long func6 (__m128d x) { - return _mm_cvtts_roundsd_epu32 + return _mm_cvtts_roundsd_u32 (x, _MM_FROUND_TO_NEAREST_INT | _MM_FROUND_NO_EXC); } @@ -118,7 +118,7 @@ func6 (__m128d x) unsigned long long func7 (__m128d x) { - return (unsigned int) _mm_cvtts_sd_epi32 (x); + return (unsigned int) _mm_cvtts_sd_i32 (x); } /* @@ -134,6 +134,6 @@ func7 (__m128d x) unsigned long long func8 (__m128d x) { - return (unsigned int) _mm_cvtts_roundsd_epi32 + return (unsigned int) _mm_cvtts_roundsd_i32 (x, _MM_FROUND_TO_NEAREST_INT | _MM_FROUND_NO_EXC); }