public inbox for gcc-cvs@sourceware.org
help / color / mirror / Atom feed
* [gcc r10-7244] amdgcn: Add cond_add/sub/and/ior/xor for all vector modes
@ 2020-03-18 12:55 Andrew Stubbs
  0 siblings, 0 replies; only message in thread
From: Andrew Stubbs @ 2020-03-18 12:55 UTC (permalink / raw)
  To: gcc-cvs

https://gcc.gnu.org/g:5a80a6c3e5f800de63a2eadd8ae3e6822172a718

commit r10-7244-g5a80a6c3e5f800de63a2eadd8ae3e6822172a718
Author: Andrew Stubbs <ams@codesourcery.com>
Date:   Tue Mar 3 17:36:49 2020 +0000

    amdgcn: Add cond_add/sub/and/ior/xor for all vector modes
    
    2020-03-18  Andrew Stubbs  <ams@codesourcery.com>
    
            gcc/
            * config/gcn/gcn-valu.md (COND_MODE): Delete.
            (COND_INT_MODE): Delete.
            (cond_op): Add "mult".
            (cond_<expander><mode>): Use VEC_ALLREG_MODE.
            (cond_<expander><mode>): Use VEC_ALLREG_INT_MODE.

Diff:
---
 gcc/ChangeLog              |  8 ++++++++
 gcc/config/gcn/gcn-valu.md | 27 ++++++++++++---------------
 2 files changed, 20 insertions(+), 15 deletions(-)

diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index 114d2992bcd..dac1d41f3ea 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,11 @@
+2020-03-18  Andrew Stubbs  <ams@codesourcery.com>
+
+	* config/gcn/gcn-valu.md (COND_MODE): Delete.
+	(COND_INT_MODE): Delete.
+	(cond_op): Add "mult".
+	(cond_<expander><mode>): Use VEC_ALLREG_MODE.
+	(cond_<expander><mode>): Use VEC_ALLREG_INT_MODE.
+
 2020-03-18   Richard Biener  <rguenther@suse.de>
 
 	PR middle-end/94206
diff --git a/gcc/config/gcn/gcn-valu.md b/gcc/config/gcn/gcn-valu.md
index a8034f77798..68d89fadc9e 100644
--- a/gcc/config/gcn/gcn-valu.md
+++ b/gcc/config/gcn/gcn-valu.md
@@ -2903,19 +2903,15 @@
     DONE;
   })
 
-; FIXME this should be VEC_REG_MODE, but not all dependencies are implemented.
-(define_mode_iterator COND_MODE [V64SI V64DI V64SF V64DF])
-(define_mode_iterator COND_INT_MODE [V64SI V64DI])
-
-(define_code_iterator cond_op [plus minus])
+(define_code_iterator cond_op [plus minus mult])
 
 (define_expand "cond_<expander><mode>"
-  [(match_operand:COND_MODE 0 "register_operand")
+  [(match_operand:VEC_ALLREG_MODE 0 "register_operand")
    (match_operand:DI 1 "register_operand")
-   (cond_op:COND_MODE
-     (match_operand:COND_MODE 2 "gcn_alu_operand")
-     (match_operand:COND_MODE 3 "gcn_alu_operand"))
-   (match_operand:COND_MODE 4 "register_operand")]
+   (cond_op:VEC_ALLREG_MODE
+     (match_operand:VEC_ALLREG_MODE 2 "gcn_alu_operand")
+     (match_operand:VEC_ALLREG_MODE 3 "gcn_alu_operand"))
+   (match_operand:VEC_ALLREG_MODE 4 "register_operand")]
   ""
   {
     operands[1] = force_reg (DImode, operands[1]);
@@ -2927,15 +2923,16 @@
     DONE;
   })
 
+;; TODO smin umin smax umax
 (define_code_iterator cond_bitop [and ior xor])
 
 (define_expand "cond_<expander><mode>"
-  [(match_operand:COND_INT_MODE 0 "register_operand")
+  [(match_operand:VEC_ALLREG_INT_MODE 0 "register_operand")
    (match_operand:DI 1 "register_operand")
-   (cond_bitop:COND_INT_MODE
-     (match_operand:COND_INT_MODE 2 "gcn_alu_operand")
-     (match_operand:COND_INT_MODE 3 "gcn_alu_operand"))
-   (match_operand:COND_INT_MODE 4 "register_operand")]
+   (cond_bitop:VEC_ALLREG_INT_MODE
+     (match_operand:VEC_ALLREG_INT_MODE 2 "gcn_alu_operand")
+     (match_operand:VEC_ALLREG_INT_MODE 3 "gcn_alu_operand"))
+   (match_operand:VEC_ALLREG_INT_MODE 4 "register_operand")]
   ""
   {
     operands[1] = force_reg (DImode, operands[1]);


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2020-03-18 12:55 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-03-18 12:55 [gcc r10-7244] amdgcn: Add cond_add/sub/and/ior/xor for all vector modes Andrew Stubbs

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).