[Bug target/70928] Load simple float constants via VSX operations on PowerPC

2024-03-27 Thread segher at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=70928

--- Comment #6 from Segher Boessenkool  ---
"All"...  not the non-finite denormals ;-)

[Bug target/70928] Load simple float constants via VSX operations on PowerPC

2024-03-27 Thread meissner at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=70928

Michael Meissner  changed:

   What|Removed |Added

 Ever confirmed|0   |1
   Last reconfirmed||2024-03-27
 Status|UNCONFIRMED |NEW

--- Comment #5 from Michael Meissner  ---
Power10 can now load all SFmode constants and many DFmode constants via the
XXSPLTIDP instructions.  As time goes by, I would imagine doing this
optimization for power8 and power9 machines becomes less important.

[Bug target/70928] Load simple float constants via VSX operations on PowerPC

2020-11-14 Thread jens.seifert at de dot ibm.com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=70928

Jens Seifert  changed:

   What|Removed |Added

 CC||jens.seifert at de dot ibm.com

--- Comment #4 from Jens Seifert  ---
values -16.0..+15.0.
vspltisw  0,
xvcvsxwdp 32,32

values -16.0f..+15.0f
vspltisw  0,
xvcvsxwsp 32,32

-0.0 / 0x8000
xxlxor 32,32,32
xvnabsdp 32,32 or xvnegdp 32,32

-0.0f / 0x8000
xxlxor 32,32,32
xvnabssp 32,32 or xvnegsp 32,32

0x7FFF
vspltisw 0,-1
xvabsdp 32,32

0x7FFF
vspltisw 0,-1
xvabssp 32,32

[Bug target/70928] Load simple float constants via VSX operations on PowerPC

2020-01-06 Thread wschmidt at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=70928

Bill Schmidt  changed:

   What|Removed |Added

 CC||jens.seifert at de dot ibm.com

--- Comment #3 from Bill Schmidt  ---
*** Bug 93128 has been marked as a duplicate of this bug. ***

[Bug target/70928] Load simple float constants via VSX operations on PowerPC

2016-05-03 Thread bergner at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=70928

--- Comment #2 from Peter Bergner  ---
Can powers of 2 values be generated with a splat followed by a shift?

[Bug target/70928] Load simple float constants via VSX operations on PowerPC

2016-05-03 Thread wschmidt at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=70928

--- Comment #1 from Bill Schmidt  ---
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.