public inbox for gcc-cvs@sourceware.org help / color / mirror / Atom feed
From: Paul Clarke <pc@gcc.gnu.org> To: gcc-cvs@gcc.gnu.org Subject: [gcc r12-2643] rs6000: Add support for SSE4.1 "ceil" intrinsics Date: Fri, 30 Jul 2021 21:56:57 +0000 (GMT) [thread overview] Message-ID: <20210730215657.91DC13861024@sourceware.org> (raw) https://gcc.gnu.org/g:bd9a8737d478f7f1d01a9d5f1cc4309ffbb53103 commit r12-2643-gbd9a8737d478f7f1d01a9d5f1cc4309ffbb53103 Author: Paul A. Clarke <pc@us.ibm.com> Date: Thu Jul 1 17:04:51 2021 -0500 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. Diff: --- gcc/config/rs6000/smmintrin.h | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) diff --git a/gcc/config/rs6000/smmintrin.h b/gcc/config/rs6000/smmintrin.h index 382f50c90c5..919627b0810 100644 --- a/gcc/config/rs6000/smmintrin.h +++ b/gcc/config/rs6000/smmintrin.h @@ -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
reply other threads:[~2021-07-30 21:56 UTC|newest] Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=20210730215657.91DC13861024@sourceware.org \ --to=pc@gcc.gnu.org \ --cc=gcc-cvs@gcc.gnu.org \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).