From: Andrew Stubbs <ams@codesourcery.com>
To: <gcc-patches@gcc.gnu.org>
Subject: [committed 5/6] amdgcn: Add vector integer negate insn
Date: Tue, 11 Oct 2022 12:02:07 +0100 [thread overview]
Message-ID: <bf6b5c74a6f1927174091c73aa51401895ef92f0.1665485382.git.ams@codesourcery.com> (raw)
In-Reply-To: <cover.1665485382.git.ams@codesourcery.com>
[-- Attachment #1: Type: text/plain, Size: 258 bytes --]
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.
---
gcc/config/gcn/gcn-valu.md | 13 +++++++++++++
1 file changed, 13 insertions(+)
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: 0005-amdgcn-Add-vector-integer-negate-insn.patch --]
[-- Type: text/x-patch; name="0005-amdgcn-Add-vector-integer-negate-insn.patch", Size: 632 bytes --]
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 @@ (define_insn "<expander><vnsi>3<exec>"
[(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
next prev parent reply other threads:[~2022-10-11 11:04 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-10-11 11:02 [committed 0/6] amdgcn: Add V32, V16, V8, V4, and V2 vectors Andrew Stubbs
2022-10-11 11:02 ` [committed 1/6] amdgcn: add multiple vector sizes Andrew Stubbs
2022-10-17 12:26 ` GCN: Restore build with GCC 4.8 (was: [committed 1/6] amdgcn: add multiple vector sizes) Thomas Schwinge
2022-10-11 11:02 ` [committed 2/6] amdgcn: Resolve insn conditions at compile time Andrew Stubbs
2022-10-11 11:02 ` [committed 3/6] amdgcn: Add vec_extract for partial vectors Andrew Stubbs
2022-10-11 11:02 ` [committed 4/6] amdgcn: vec_init for multiple vector sizes Andrew Stubbs
2022-10-11 11:02 ` Andrew Stubbs [this message]
2022-10-11 11:02 ` [committed 6/6] amdgcn: vector testsuite tweaks Andrew Stubbs
2022-10-28 7:46 ` Thomas Schwinge
2022-10-28 8:38 ` Stubbs, Andrew
2022-10-28 9:00 ` Thomas Schwinge
2022-10-11 11:29 ` [committed 0/6] amdgcn: Add V32, V16, V8, V4, and V2 vectors Richard Biener
2022-10-11 11:53 ` Andrew Stubbs
2022-10-11 11:58 ` Richard Biener
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=bf6b5c74a6f1927174091c73aa51401895ef92f0.1665485382.git.ams@codesourcery.com \
--to=ams@codesourcery.com \
--cc=gcc-patches@gcc.gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).