Hi!

On Wed, Sep 23, 2020 at 05:12:44PM -0500, Paul A. Clarke wrote:
> +extern __inline __m128i __attribute__((__gnu_inline__, __always_inline__, 
> __artificial__))
> +_mm_insert_epi8 (__m128i const __A, int const __D, int const __N)
> +{
> +  __v16qi result = (__v16qi)__A;
> +
> +  result [(__N & 0b1111)] = __D;

Hrm, GCC supports binary constants like this since 2007, so okay.  But I
have to wonder if this improves anything over hex (or decimal even!)
The parens are superfluous (and only hinder legibility), fwiw.

> +_mm_insert_epi64 (__m128i const __A, long long const __D, int const __N)
> +{
> +  __v2di result = (__v2di)__A;
> +
> +  result [(__N & 0b1)] = __D;

Especially single-digit numbers look really goofy (like 0x0, but even
worse for binary somehow).

Anyway, okay for trunk, with or without those things improved.  Thanks!


Segher

Reply via email to