I backported the changes for adding the ISA 3.0 C min/max and floating point
scalar compare generating a mask (for conditional move) to the GCC 6.2 branch.
The changes in this patch were checked into the trunk on May 25th (with one
patch from May 18th from a patch set that has not been backported yet).  I did
a bootstrap and make check, and there were no regresions.

[gcc]
2016-06-02  Michael Meissner  <meiss...@linux.vnet.ibm.com>

        Back port from trunk
        2016-05-26  Michael Meissner  <meiss...@linux.vnet.ibm.com>

        * config/rs6000/rs6000.c (rs6000_emit_p9_fp_minmax): New function
        for ISA 3.0 min/max support.
        (rs6000_emit_p9_fp_cmove): New function for ISA 3.0 floating point
        conditional move support.
        (rs6000_emit_cmove): Call rs6000_emit_p9_fp_minmax and
        rs6000_emit_p9_fp_cmove if the ISA 3.0 instructions are
        available.
        * config/rs6000/rs6000.md (SFDF2): New iterator to allow doing
        conditional moves where the comparison type is different from move
        type.
        (fp_minmax): New code iterator for smin/smax.
        (minmax): New code attributes for min/max.
        (SMINMAX): Likewise.
        (smax<mode>3): Combine min, max insns into one insn using the
        fp_minmax code iterator.  Add support for ISA 3.0 min/max
        instructions that don't need -ffast-math.
        (s<minmax><mode>3): Likewise.
        (smax<mode>3_vsx): Likewise.
        (smin<mode>3): Likewise.
        (s<minmax><mode>3_vsx): Likewise.
        (smin<mode>3_vsx): Likewise.
        (pre-VSX min/max splitters): Likewise.
        (s<minmax><mode>3_fpr): Likewise.
        (movsfcc): Rewrite floating point conditional moves to combine
        SFmode/DFmode into a single insn.
        (mov<mode>cc): Likewise.
        (movdfcc): Likewise.
        (fselsfsf4): Combine FSEL cases into a single insn, using SFDF and
        SFDF2 iterators to handle all combinations.
        (fseldfsf4): Likewise.
        (fsel<SFDF:mode><SFDF2:mode>4): Likewise.
        (fseldfdf4): Likewise.
        (fselsfdf4): Likewise.
        (mov<SFDF:mode><SFDF2:mode>cc_p9): Add support for the ISA 3.0
        comparison instructions that set a 0/-1 mask, and use it for
        floating point conditional move via XXSEL.
        (fpmask<mode>): Likewise.
        (xxsel<mode>): Likewise.
        * config/rs6000/predicates.md (min_max_operator): Delete, no
        longer used.
        (fpmask_comparison_operaton): New insn for ISA 3.0 comparison
        instructions that generate a 0/-1 mask for use with XXSEL.
        * config/rs6000/rs6000.h (TARGET_MINMAX_SF): New helper macros to
        say whether floating point min/max is available, either through
        FSEL, ISA 2.06 min/max, and ISA 3.0 min/max instrucitons.
        (TARGET_MINMAX_DF): Likewise.

        Back port from trunk
        2016-05-18  Michael Meissner  <meiss...@linux.vnet.ibm.com>

        * config/rs6000/predicate.md (all_ones_constant): New predicate
        for vector constant with all 1's set.

[gcc/testsuite]
2016-06-02  Michael Meissner  <meiss...@linux.vnet.ibm.com>

        Back port from trunk
        2016-05-26  Michael Meissner  <meiss...@linux.vnet.ibm.com>

        * gcc.target/powerpc/p9-minmax-1.c: New tests for ISA 3.0
        floating point min/max/comparison instructions.
        * gcc.target/powerpc/p9-minmax-2.c: Likewise.


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

Reply via email to