Add IEEE 128-bit min/max support on PowerPC.
authorMichael Meissner <meissner@linux.ibm.com>
Fri, 18 Jun 2021 02:05:16 +0000 (22:05 -0400)
committerMichael Meissner <meissner@linux.ibm.com>
Fri, 18 Jun 2021 02:05:16 +0000 (22:05 -0400)
commit7d08043da935095543172f91f691917bd6379c53
treec7f3bebe4a23809c4a90d8b208ff7ae04b44f037
parent688359a27d835bbdab554fdf5eb207f1bd678371
Add IEEE 128-bit min/max support on PowerPC.

This patch adds the support for the IEEE 128-bit floating point C minimum and
maximum instructions.  The next patch will add the support for using the
compare and set mask instruction to implement conditional moves.

This patch does not try to re-use the code used for SF/DF min/max
support.  It defines a separate insn for the IEEE 128-bit support.  It
uses the code iterator <minmax> to simplify adding both operations.

GCC will not convert ternary operations into using min/max instructions
provided in this patch unless the user uses -Ofast.  The next patch that adds
conditional move instructions will enable the ternary conversion in many cases.

gcc/
2021-06-17  Michael Meissner  <meissner@linux.ibm.com>

* config/rs6000/rs6000.c (rs6000_emit_minmax): Add support for ISA
3.1 IEEE 128-bit floating point xsmaxcqp/xsmincqp instructions.
* config/rs6000/rs6000.md (s<minmax><mode>3, IEEE128 iterator):
New insns.

gcc/testsuite/
2021-06-17  Michael Meissner  <meissner@linux.ibm.com>

* gcc.target/powerpc/float128-minmax-2.c: New test.
gcc/config/rs6000/rs6000.c
gcc/config/rs6000/rs6000.md
gcc/testsuite/gcc.target/powerpc/float128-minmax-2.c [new file with mode: 0644]