public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
* [PATCH 0/2] Power10 IEEE 128-bit min, max, cmove
@ 2020-11-16  4:45 Michael Meissner
  2020-11-16  4:50 ` [PATCH 1/2] Power10: Add IEEE 128-bit xsmaxcqp and xsmincqp support Michael Meissner
  2020-11-16  4:53 ` [PATCH 2/2] Power10: Add IEEE 128-bit fp conditional move Michael Meissner
  0 siblings, 2 replies; 8+ messages in thread
From: Michael Meissner @ 2020-11-16  4:45 UTC (permalink / raw)
  To: gcc-patches, Michael Meissner, Segher Boessenkool,
	David Edelsohn, Bill Schmidt, Peter Bergner

These two patches add support for the XSMAXCQP, XSMINCQP, XSCMP{EQ,GT,GE}QP
instructions in the Power10.  These instructions allow the compiler to generate
minimum, maxmimum, and conditional move support for IEEE 128-bit floating point
type.

I have posted versions of these patches before, going back to at least the June
time frame.  Because I wanted to focus on getting support in the library to
allow long double to be configured as IEEE 128-bit on little endian PowerPC
server systems, I haven't reposted these patches in awhile.  While the other
patches are more important, it would be nice to get these patches into GCC 11.

In these patches, I attempted to address various comments from the previous
times I posted the patches.

There are 2 patches in this set.  The first adds the min/max support if
-ffast-math is used.  The second adds conditional move support, and it enables
the min/max to be generated more often.

I have done bootstrap compilers on both little endian power9 systems and big
endian power8 system many time.  I would like to commit these patches to the
master branch.

-- 
Michael Meissner, IBM
IBM, M/S 2506R, 550 King Street, Littleton, MA 01460-6245, USA
email: meissner@linux.ibm.com, phone: +1 (978) 899-4797

^ permalink raw reply	[flat|nested] 8+ messages in thread
* [PATCH 0/2] Rework adding Power10 IEEE 128-bit min, max, and conditional move
@ 2020-09-22  3:39 Michael Meissner
  2020-09-22  3:41 ` [PATCH 1/2] Power10: Add IEEE 128-bit xsmaxcqp and xsmincqp support Michael Meissner
  0 siblings, 1 reply; 8+ messages in thread
From: Michael Meissner @ 2020-09-22  3:39 UTC (permalink / raw)
  To: gcc-patches, Michael Meissner, Segher Boessenkool,
	David Edelsohn, Bill Schmidt, Peter Bergner

These patches are my latest versions of the patches to add IEEE 128-bit min,
max, and conditional move to GCC.  They correspond to the earlier patches #3
and #4 (patches #1 and #2 have been installed).

The first patch just adds support for the xsmincqp and xsmaxcqp instructions.
Due to the NaN rules, this patch will only generate the minc/maxc instructions
if -ffast-math is used.  Unlike the previous patch, I did not try to combine
min/max for IEEE 128-bit with the existing power9 min/max for SF/DF mode.
Instead, I just created a new insn (without a generator for it).

The second patch adds the support for doing a conditional move, where the
comparison is one of the 4 binary floating point scalar types.  The types being
moved do not have to be the same as the types for comparison.  Unlike the
previous patches, I did not try to combine the normal comparison and the
reversed comparison into one insn.  Instead, I kept the two insns.

After using it for awhile, I did not like using SFDFKFTF as the mode for all 4
floating point types.  Instead, I used FPMASK and FPMASK2 for the cases that we
generate the compare and set mask instruction to do the conditional move.

As with power9, the conditional move allows some forms of min/max to be
generated without using -ffast-math, assuming the tests give the right results
for NaN's.

I have built bootstrapped compilers with/without these patches, and there were
no regressions in the test suite.  Can I check these patches into the master
branch?

I do not anticipate needing to back port these changes to GCC 10.

-- 
Michael Meissner, IBM
IBM, M/S 2506R, 550 King Street, Littleton, MA 01460-6245, USA
email: meissner@linux.ibm.com, phone: +1 (978) 899-4797

^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2020-12-10 15:40 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-11-16  4:45 [PATCH 0/2] Power10 IEEE 128-bit min, max, cmove Michael Meissner
2020-11-16  4:50 ` [PATCH 1/2] Power10: Add IEEE 128-bit xsmaxcqp and xsmincqp support Michael Meissner
2020-12-04  4:35   ` Ping: " Michael Meissner
2020-12-10 15:38   ` Ping x2: " Michael Meissner
2020-11-16  4:53 ` [PATCH 2/2] Power10: Add IEEE 128-bit fp conditional move Michael Meissner
2020-12-04  4:37   ` Ping: " Michael Meissner
2020-12-10 15:40   ` Ping x2: " Michael Meissner
  -- strict thread matches above, loose matches on Subject: below --
2020-09-22  3:39 [PATCH 0/2] Rework adding Power10 IEEE 128-bit min, max, and " Michael Meissner
2020-09-22  3:41 ` [PATCH 1/2] Power10: Add IEEE 128-bit xsmaxcqp and xsmincqp support Michael Meissner

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).