From: "Kewen.Lin" <linkw@linux.ibm.com>
To: GCC Patches <gcc-patches@gcc.gnu.org>
Cc: Bill Schmidt <wschmidt@linux.ibm.com>,
Segher Boessenkool <segher@kernel.crashing.org>,
dje.gcc@gmail.com
Subject: [PATCH 2/7 V2] rs6000: lenload/lenstore optab support
Date: Wed, 10 Jun 2020 14:43:18 +0800 [thread overview]
Message-ID: <66b3b9aa-726c-461c-45df-93fffd69f16f@linux.ibm.com> (raw)
In-Reply-To: <1dd73439-6bd8-9cc4-3233-50b681a2f494@linux.ibm.com>
[-- Attachment #1: Type: text/plain, Size: 199 bytes --]
V2: Update the define_expand to use QImode.
gcc/ChangeLog:
2020-MM-DD Kewen Lin <linkw@gcc.gnu.org>
* config/rs6000/vsx.md (lenload<mode>qi): New define_expand.
(lenstore<mode>qi): Likewise.
[-- Attachment #2: rs6000_v2.patch --]
[-- Type: text/plain, Size: 1499 bytes --]
---
gcc/config/rs6000/vsx.md | 32 ++++++++++++++++++++++++++++++++
1 file changed, 32 insertions(+)
diff --git a/gcc/config/rs6000/vsx.md b/gcc/config/rs6000/vsx.md
index 2a28215ac5b..6ee4cabc964 100644
--- a/gcc/config/rs6000/vsx.md
+++ b/gcc/config/rs6000/vsx.md
@@ -5082,6 +5082,38 @@
operands[3] = gen_reg_rtx (DImode);
})
+;; Define optab for vector access with length vectorization exploitation.
+(define_expand "lenload<mode>qi"
+ [(match_operand:VEC_A 0 "vlogical_operand")
+ (match_operand:VEC_A 1 "memory_operand")
+ (match_operand:QI 2 "int_reg_operand")]
+ "TARGET_P9_VECTOR && TARGET_64BIT"
+{
+ rtx mem = XEXP (operands[1], 0);
+ mem = force_reg (DImode, mem);
+ rtx len = gen_lowpart (DImode, operands[2]);
+ rtx res = gen_reg_rtx (V16QImode);
+ emit_insn (gen_lxvl (res, mem, len));
+ emit_move_insn (operands[0], gen_lowpart (<MODE>mode, res));
+ DONE;
+})
+
+(define_expand "lenstore<mode>qi"
+ [(match_operand:VEC_A 0 "memory_operand")
+ (match_operand:VEC_A 1 "vlogical_operand")
+ (match_operand:QI 2 "int_reg_operand")
+ ]
+ "TARGET_P9_VECTOR && TARGET_64BIT"
+{
+ rtx val = gen_reg_rtx (V16QImode);
+ emit_move_insn (val, gen_lowpart (V16QImode, operands[1]));
+ rtx mem = XEXP (operands[0], 0);
+ mem = force_reg (DImode, mem);
+ rtx len = gen_lowpart (DImode, operands[2]);
+ emit_insn (gen_stxvl (val, mem, len));
+ DONE;
+})
+
(define_insn "*stxvl"
[(set (mem:V16QI (match_operand:DI 1 "gpc_reg_operand" "b"))
(unspec:V16QI
--
next prev parent reply other threads:[~2020-06-10 6:43 UTC|newest]
Thread overview: 80+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-05-26 5:49 [PATCH 0/7] Support vector load/store with length Kewen.Lin
2020-05-26 5:51 ` [PATCH 1/7] ifn/optabs: " Kewen.Lin
2020-06-10 6:41 ` [PATCH 1/7 V2] " Kewen.Lin
2020-06-10 9:22 ` Richard Sandiford
2020-06-10 12:36 ` [PATCH 1/7 V3] " Kewen.Lin
2020-06-22 8:51 ` [PATCH 1/7 V4] " Kewen.Lin
2020-06-22 19:59 ` Richard Sandiford
2020-06-22 22:19 ` Segher Boessenkool
2020-06-23 3:54 ` [PATCH 1/7 v5] " Kewen.Lin
2020-06-23 9:52 ` Richard Sandiford
2020-06-23 11:25 ` Richard Biener
2020-06-23 12:20 ` Richard Sandiford
2020-06-24 2:40 ` Jim Wilson
2020-06-24 7:34 ` Richard Sandiford
2020-06-29 6:32 ` [PATCH 1/7 v6] " Kewen.Lin
2020-06-29 10:07 ` Richard Sandiford
2020-06-29 10:39 ` [PATCH 1/7 v7] " Kewen.Lin
2020-06-30 15:32 ` Richard Sandiford
2020-07-01 13:35 ` [PATCH 1/7 v8] " Kewen.Lin
2020-07-07 9:24 ` Richard Sandiford
2020-06-24 23:56 ` [PATCH 1/7 v5] " Segher Boessenkool
2020-06-23 6:47 ` [PATCH 1/7 V4] " Richard Biener
2020-05-26 5:53 ` [PATCH 2/7] rs6000: lenload/lenstore optab support Kewen.Lin
2020-06-10 6:43 ` Kewen.Lin [this message]
2020-06-10 12:39 ` [PATCH 2/7 V3] " Kewen.Lin
2020-06-11 22:55 ` Segher Boessenkool
2020-06-12 3:02 ` Kewen.Lin
2020-06-23 3:58 ` [PATCH 2/7 v4] " Kewen.Lin
2020-06-29 6:32 ` [PATCH 2/7 v5] " Kewen.Lin
2020-06-29 17:57 ` Segher Boessenkool
2020-05-26 5:54 ` [PATCH 3/7] vect: Factor out codes for niters smaller than vf check Kewen.Lin
2020-05-26 5:55 ` [PATCH 4/7] hook/rs6000: Add vectorize length mode for vector with length Kewen.Lin
2020-06-10 6:44 ` [PATCH 4/7 V2] " Kewen.Lin
2020-05-26 5:57 ` [PATCH 5/7] vect: Support vector load/store with length in vectorizer Kewen.Lin
2020-05-26 12:49 ` Richard Sandiford
2020-05-26 12:52 ` Richard Sandiford
2020-05-27 8:25 ` Kewen.Lin
2020-05-27 10:02 ` Richard Sandiford
2020-05-28 1:21 ` Kewen.Lin
2020-05-29 8:32 ` Richard Sandiford
2020-05-29 12:38 ` Segher Boessenkool
2020-06-02 9:03 ` [PATCH 5/7 v3] " Kewen.Lin
2020-06-02 11:50 ` Richard Sandiford
2020-06-02 17:01 ` Segher Boessenkool
2020-06-03 6:33 ` Kewen.Lin
2020-06-10 9:19 ` [PATCH 5/7 v4] " Kewen.Lin
2020-06-22 8:33 ` [PATCH 5/7 v5] " Kewen.Lin
2020-06-29 6:33 ` [PATCH 5/7 v6] " Kewen.Lin
2020-06-30 19:53 ` Richard Sandiford
2020-07-01 13:23 ` Kewen.Lin
2020-07-01 15:17 ` Richard Sandiford
2020-07-02 5:20 ` Kewen.Lin
2020-07-07 9:26 ` Kewen.Lin
2020-07-07 10:44 ` Richard Sandiford
2020-07-08 6:52 ` Kewen.Lin
2020-07-08 12:50 ` Richard Sandiford
2020-07-10 7:40 ` Kewen.Lin
2020-07-07 10:15 ` Richard Sandiford
2020-07-08 7:01 ` Kewen.Lin
2020-07-10 9:55 ` [PATCH 5/7 v7] " Kewen.Lin
2020-07-17 9:54 ` Richard Sandiford
2020-07-20 2:25 ` Kewen.Lin
2020-05-26 5:58 ` [PATCH 6/7] ivopts: Add handlings for vector with length IFNs Kewen.Lin
2020-07-22 12:51 ` Richard Sandiford
2020-05-26 5:59 ` [PATCH 7/7] rs6000/testsuite: Vector with length test cases Kewen.Lin
2020-07-10 10:07 ` [PATCH 7/7 v2] " Kewen.Lin
2020-07-20 16:58 ` Segher Boessenkool
2020-07-21 2:53 ` Kewen.Lin
2020-05-26 7:12 ` [PATCH 0/7] Support vector load/store with length Richard Biener
2020-05-26 8:51 ` Kewen.Lin
2020-05-26 9:44 ` Richard Biener
2020-05-26 10:10 ` Kewen.Lin
2020-05-26 12:29 ` Richard Sandiford
2020-05-27 0:09 ` Segher Boessenkool
2020-05-27 7:25 ` Richard Biener
2020-05-27 8:50 ` Kewen.Lin
2020-05-27 14:08 ` Segher Boessenkool
2020-05-26 22:34 ` Jim Wilson
2020-05-27 7:21 ` Richard Biener
2020-05-27 7:46 ` Richard Sandiford
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=66b3b9aa-726c-461c-45df-93fffd69f16f@linux.ibm.com \
--to=linkw@linux.ibm.com \
--cc=dje.gcc@gmail.com \
--cc=gcc-patches@gcc.gnu.org \
--cc=segher@kernel.crashing.org \
--cc=wschmidt@linux.ibm.com \
/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).