public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
* Re: [PATCH] rs6000: Add Power10 optimization for _mm_blendv*
@ 2022-01-07 19:15 David Edelsohn
  2022-01-07 20:32 ` Paul A. Clarke
  0 siblings, 1 reply; 4+ messages in thread
From: David Edelsohn @ 2022-01-07 19:15 UTC (permalink / raw)
  To: Paul A. Clarke, Segher Boessenkool; +Cc: GCC Patches

> Power10 ISA added `xxblendv*` instructions which are realized in the
> `vec_blendv` instrinsic.
>
> Use `vec_blendv` for `_mm_blendv_epi8`, `_mm_blendv_ps`, and
> `_mm_blendv_pd` compatibility intrinsics, when `_ARCH_PWR10`.
>
> Also, copy a test from i386 for testing `_mm_blendv_ps`.
> This should have come with commit ed04cf6d73e233c74c4e55c27f1cbd89ae4710e8,
> but was inadvertently omitted.
>
> 2021-10-20  Paul A. Clarke  <pc@us.ibm.com>
>
> gcc
> * config/rs6000/smmintrin.h (_mm_blendv_epi8): Use vec_blendv
> when _ARCH_PWR10.
> (_mm_blendv_ps): Likewise.
> (_mm_blendv_pd): Likewise.
>
> gcc/testsuite
> * gcc.target/powerpc/sse4_1-blendvps.c: Copy from gcc.target/i386,
> adjust dg directives to suit.
> ---
> Tested on Power10 powerpc64le-linux (compiled with and without
> `-mcpu=power10`).
>
> OK for trunk?

This is okay modulo

> + return (__m128i) vec_blendv ((__v16qu) __A, (__v16qu) __B, (__v16qu) __mask);

Should the above be __v16qi like x86?

Thanks, David

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2022-01-10 18:27 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-01-07 19:15 [PATCH] rs6000: Add Power10 optimization for _mm_blendv* David Edelsohn
2022-01-07 20:32 ` Paul A. Clarke
2022-01-07 20:50   ` David Edelsohn
2022-01-10 18:27     ` [v2 COMMITTED] " Paul A. Clarke

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).