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

--- Comment #1 from Bill Schmidt <wschmidt at gcc dot gnu.org> ---
Short sequences for the rest of -32 to 31 are possible also.  The splats can be
done as follows.

x even, x in [-32,-18] U [16,30]:

  vspltis[bhw]  t, x
  vaddu[bhw]m   y, t, t

x odd, x in [17,31]:

  vspltis[bhw]  t, x-16
  vspltis[bhw]  u, -16
  vsubu[bhw]m   y, t, u

x odd, x in [-31,-17]:

  vspltisw  t, x+16
  vspltisw  u, -16
  vadduwm   y, t, u

These can then again be unpacked and converted to floating point.  This may or
may not be preferable to a load, as the dependency chains start to get a bit
long.

Reply via email to