public inbox for gcc-cvs@sourceware.org
help / color / mirror / Atom feed
* [gcc r13-3224] amdgcn: Add vector integer negate insn
@ 2022-10-11 11:01 Andrew Stubbs
  0 siblings, 0 replies; only message in thread
From: Andrew Stubbs @ 2022-10-11 11:01 UTC (permalink / raw)
  To: gcc-cvs

https://gcc.gnu.org/g:bf6b5c74a6f1927174091c73aa51401895ef92f0

commit r13-3224-gbf6b5c74a6f1927174091c73aa51401895ef92f0
Author: Andrew Stubbs <ams@codesourcery.com>
Date:   Thu Sep 22 12:48:30 2022 +0100

    amdgcn: Add vector integer negate insn
    
    Another example of the vectorizer needing explicit insns where the scalar
    expander just works.
    
    gcc/ChangeLog:
    
            * config/gcn/gcn-valu.md (neg<mode>2): New define_expand.

Diff:
---
 gcc/config/gcn/gcn-valu.md | 13 +++++++++++++
 1 file changed, 13 insertions(+)

diff --git a/gcc/config/gcn/gcn-valu.md b/gcc/config/gcn/gcn-valu.md
index f708e587f38..00c0e3be1ea 100644
--- a/gcc/config/gcn/gcn-valu.md
+++ b/gcc/config/gcn/gcn-valu.md
@@ -2390,6 +2390,19 @@
   [(set_attr "type" "vop2,ds")
    (set_attr "length" "8,8")])
 
+;; }}}
+;; {{{ Int unops
+
+(define_expand "neg<mode>2"
+  [(match_operand:V_INT 0 "register_operand")
+   (match_operand:V_INT 1 "register_operand")]
+  ""
+  {
+    emit_insn (gen_sub<mode>3 (operands[0], gcn_vec_constant (<MODE>mode, 0),
+			       operands[1]));
+    DONE;
+  })
+
 ;; }}}
 ;; {{{ FP binops - special cases

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

only message in thread, other threads:[~2022-10-11 11:01 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-10-11 11:01 [gcc r13-3224] amdgcn: Add vector integer negate insn 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).