[PATCH 0/3, v2] rs6000: Add support for Matrix-Multiply Assist (MMA) built-in functions.

Peter Bergner bergner@linux.ibm.com
Wed Jun 24 19:28:00 GMT 2020


On 6/18/20 3:42 PM, Peter Bergner wrote:
> POWER ISA 3.1 added new Matrix-Multiply Assist (MMA) instructions.
> The following patch set adds support for generating these instructions
> through built-in functions which are enabled with the -mmma option.
> 
> The patch1 and patch1+patch2+patch3 have been bootstrapped and regtested on
> powerpc64le-linux with no regressions.  In addition, patch1+patch2+patch3
> has been bootstrapped and regtested on powerpc64-linux (BE), also without
> regressions.  I'll note that I split the testsuite changes into their own
> patch for review purposes, but I plan on committing patch2 and patch3 together.
> 
> Changes since v1:
>   Patch 1/3:
>     - Modified verbiage in mma.md per Will's suggestion.
>     - Modified rs6000_split_multireg_move to correctly handle BE PXImode
>       and POImode moves.
>   Patch 2/3:
>     - Updated ChangeLog entry per Segher's suggestion.
>     - Updated doc/extend.texi with correct built-in names for
>       __builtin_vsx_xvcvspbf16 and __builtin_vsx_xvcvbf16sp.
>   Patch 3/3:
>     - No changes.

The committed patches don't seem to have caused any bootstrap issues on trunk
and are pretty independent of the rest of the rs6000 backend, so I'd like
permission to back port the two commits to GCC 10.  Patch 2 makes used of
the u8bit_cint_operand predicate which Kelvin added, but that isn't in GCC 10,
so I need to back port that change too.

The back ports of the MMA patches/commits was straight forward and I'm
currently bootstrapping/regtesting the backports on both powerpc64le-linux
and powerpc64-linux.  Is this (including the hunk below) ok for GCC 10
release branch assuming the tests come back clean?

Peter


    rs6000: Backport u8bit_cint_operand predicate.
    
    2020-05-11  Kelvin Nilsen  <wschmidt@linux.ibm.com>
            Backported from master
            * config/rs6000/predicates.md (u8bit_cint_operand): New predicate.

diff --git a/gcc/config/rs6000/predicates.md b/gcc/config/rs6000/predicates.md
index bf04e4d431f..529c2beb773 100644
--- a/gcc/config/rs6000/predicates.md
+++ b/gcc/config/rs6000/predicates.md
@@ -234,6 +234,11 @@ (define_predicate "u7bit_cint_operand"
   (and (match_code "const_int")
        (match_test "IN_RANGE (INTVAL (op), 0, 127)")))
 
+;; Return 1 if op is an unsigned 8-bit constant integer.
+(define_predicate "u8bit_cint_operand"
+  (and (match_code "const_int")
+       (match_test "IN_RANGE (INTVAL (op), 0, 255)")))
+
 ;; Return 1 if op is a signed 8-bit constant integer.
 ;; Integer multiplication complete more quickly
 (define_predicate "s8bit_cint_operand"


More information about the Gcc-patches mailing list