This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH][x86] Match movss and movsd "blend" instructions


On Sat, Aug 11, 2018 at 10:59:26AM +0200, Allan Sandfeld Jensen wrote:
> +/* A subroutine of ix86_expand_vec_perm_builtin_1.  Try to implement D
> +   using movss or movsd.  */
> +static bool
> +expand_vec_perm_movs (struct expand_vec_perm_d *d)
> +{
> +  machine_mode vmode = d->vmode;
> +  unsigned i, nelt = d->nelt;
> +  rtx x;
> +
> +  if (d->one_operand_p)
> +    return false;
> +
> +  if (TARGET_SSE2 && (vmode == V2DFmode || vmode == V4SFmode))
> +    ;
> +  else
> +    return false;
> +
> +  /* Only the first element is changed. */

Two spaces after .

> +  if (d->perm[0] != nelt && d->perm[0] != 0)
> +    return false;
> +  for (i = 1; i < nelt; ++i) {
> +    {
> +      if (d->perm[i] != i + nelt - d->perm[0])
> +        return false;
> +    }
> +  }

Extraneous {}s (both pairs, the outer ones even badly indented).

Otherwise LGTM.

	Jakub


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]