aboutsummaryrefslogtreecommitdiff
path: root/gcc/input.c
diff options
context:
space:
mode:
authorMichael Meissner <meissner@linux.ibm.com>2021-07-01 14:50:34 -0400
committerMichael Meissner <meissner@linux.ibm.com>2021-07-01 14:55:32 -0400
commitb97486f465ff7ee2ed1a5305bcc211563891c37e (patch)
treec79e89f59a5407cfad6854c8dbcd25665126106d /gcc/input.c
parentf2ce64b53fa76a4c192fe51b2f6c5a863a3b1241 (diff)
downloadgcc-b97486f465ff7ee2ed1a5305bcc211563891c37e.zip
gcc-b97486f465ff7ee2ed1a5305bcc211563891c37e.tar.gz
gcc-b97486f465ff7ee2ed1a5305bcc211563891c37e.tar.bz2
Add IEEE 128-bit fp conditional move on PowerPC.
This patch adds the support for power10 IEEE 128-bit floating point conditional move and for automatically generating min/max. In this patch, I simplified things compared to previous patches. Instead of allowing any four of the modes to be used for the conditional move comparison and the move itself could use different modes, I restricted the conditional move to just the same mode. I.e. you can do: _Float128 a, b, c, d, e, r; r = (a == b) ? c : d; But you can't do: _Float128 c, d, r; double a, b; r = (a == b) ? c : d; or: _Float128 a, b; double c, d, r; r = (a == b) ? c : d; This eliminates a lot of the complexity of the code, because you don't have to worry about the sizes being different, and the IEEE 128-bit types being restricted to Altivec registers, while the SF/DF modes can use any VSX register. I did not modify the existing support that allowed conditional moves where SFmode operands are compared and DFmode operands are moved (and vice versa). I modified the test cases that I added to reflect this change. I have also fixed the test for not equal to use '!=' instead of '=='. 2021-07-01 Michael Meissner <meissner@linux.ibm.com> gcc/ * config/rs6000/rs6000.c (rs6000_maybe_emit_fp_cmove): Add IEEE 128-bit floating point conditional move support. (have_compare_and_set_mask): Add IEEE 128-bit floating point types. * config/rs6000/rs6000.md (mov<mode>cc, IEEE128 iterator): New insn. (mov<mode>cc_p10, IEEE128 iterator): New insn. (mov<mode>cc_invert_p10, IEEE128 iterator): New insn. (fpmask<mode>, IEEE128 iterator): New insn. (xxsel<mode>, IEEE128 iterator): New insn. gcc/testsuite/ * gcc.target/powerpc/float128-cmove.c: New test. * gcc.target/powerpc/float128-minmax-3.c: New test.
Diffstat (limited to 'gcc/input.c')
0 files changed, 0 insertions, 0 deletions