This is the mail archive of the gcc@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: RFC: PR14880 vec_duplicate or vec_select?


Upon further investigation... I'm seeing all sorts of missing middle
end magic here...

> how about something like -
> 
> (vec_duplicate:V4SI
>    (vec_select:SI (reg:V4SI v1)
>                   (parallel [(const_int 3)]))
>    (const_int 4))

First, what is the (const_int 4) for?  Vec_duplicate only takes one
argument.

Second, and most importantly, the above assumes vec_duplicate can 
duplicate scalars.

The documentation is vague, but the argument could be made that it refers 
only to input and outputs of vectors.

I know for a fact that the only place that deals with VEC_DUPLICATE
(simplify_unary_operation) specifically outlaws scalars as input:

  if (code == VEC_DUPLICATE)
    {
      gcc_assert (VECTOR_MODE_P (mode));

So...unless y'all decide that VEC_DUPLICATE should handle scalars, we're
back to my other implementation, which will no doubt need further
middle end machinery, but that's a separate issue:

          (vec_select:V4SI (reg:V4SI v1)
                           (parallel [(const_int 3)
                                      (const_int 3)
                                      (const_int 3)
                                      (const_int 3)])))

What do you think?  Should VEC_DUPLICATE handle scalars?  Could y'all
involved with middle-end vector issues decide?

Cheers.
Aldy


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