This patch fixes a thinko that I had that prevented negation of __ibm128 values if long double is IEEE 128-bit binary floating point.
I have checked this on a little endian power8 system with builds where the long double is set to IEEE and IBM 128-bit binary floating point, and it fixes some tests in the testsuite when long double is IEEE. Can I install this on the trunk and back port it to GCC 8.x? [gcc] 2018-06-20 Michael Meissner <meiss...@linux.ibm.com> * config/rs6000/rs6000.md (neg<mode>2_internal): Use the correct mode to check whether the mode is IBM extended. -- Michael Meissner, IBM IBM, M/S 2506R, 550 King Street, Littleton, MA 01460-6245, USA email: meiss...@linux.ibm.com, phone: +1 (978) 899-4797
Index: gcc/config/rs6000/rs6000.md =================================================================== --- gcc/config/rs6000/rs6000.md (revision 261559) +++ gcc/config/rs6000/rs6000.md (working copy) @@ -7933,7 +7933,7 @@ (define_expand "neg<mode>2" (define_insn "neg<mode>2_internal" [(set (match_operand:IBM128 0 "gpc_reg_operand" "=d") (neg:IBM128 (match_operand:IBM128 1 "gpc_reg_operand" "d")))] - "TARGET_HARD_FLOAT && FLOAT128_IBM_P (TFmode)" + "TARGET_HARD_FLOAT && FLOAT128_IBM_P (<MODE>mode)" { if (REGNO (operands[0]) == REGNO (operands[1]) + 1) return "fneg %L0,%L1\;fneg %0,%1";