rs6000: Add support for SSE4.1 "ceil" intrinsics

2021-07-30  Paul A. Clarke  <pc@us.ibm.com>

gcc
	* config/rs6000/smmintrin.h (_mm_ceil_pd, _mm_ceil_ps,
	_mm_ceil_sd, _mm_ceil_ss): New.
This commit is contained in:
Paul A. Clarke 2021-07-01 17:04:51 -05:00
parent ed04cf6d73
commit bd9a8737d4

View File

@ -232,4 +232,36 @@ _mm_test_mix_ones_zeros (__m128i __A, __m128i __mask)
return any_ones * any_zeros;
}
__inline __m128d
__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
_mm_ceil_pd (__m128d __A)
{
return (__m128d) vec_ceil ((__v2df) __A);
}
__inline __m128d
__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
_mm_ceil_sd (__m128d __A, __m128d __B)
{
__v2df __r = vec_ceil ((__v2df) __B);
__r[1] = ((__v2df) __A)[1];
return (__m128d) __r;
}
__inline __m128
__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
_mm_ceil_ps (__m128 __A)
{
return (__m128) vec_ceil ((__v4sf) __A);
}
__inline __m128
__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
_mm_ceil_ss (__m128 __A, __m128 __B)
{
__v4sf __r = (__v4sf) __A;
__r[0] = __builtin_ceil (((__v4sf) __B)[0]);
return __r;
}
#endif