https://gcc.gnu.org/bugzilla/show_bug.cgi?id=96239

Jakub Jelinek <jakub at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |jakub at gcc dot gnu.org

--- Comment #2 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
Doing it in the vectorizer wouldn't optimize it when users write it by hand,
like:

typedef char V __attribute__((vector_size (2)));
typedef char W __attribute__((vector_size (8)));

V
foo (unsigned short x)
{
  return (V) { x >> 8, x };
}

W
bar (unsigned long long x)
{
  return (W) { x >> 56, x >> 48, x >> 40, x >> 32, x >> 24, x >> 16, x >> 8, x
};
}

and forwprop doesn't have the infrastructure needed for this.
Wouldn't the bswap pass be the right spot to handle this?

Reply via email to