From: Robin Dapp <rdapp.gcc@gmail.com>
To: gcc-patches <gcc-patches@gcc.gnu.org>
Cc: rdapp.gcc@gmail.com
Subject: [PATCH] RISC-V: Remove dead perm series code and document.
Date: Fri, 17 May 2024 17:27:03 +0200 [thread overview]
Message-ID: <1d8f76e3-bc27-4802-823a-fe205ace590c@gmail.com> (raw)
Hi,
with the introduction of shuffle_series_patterns the explicit handler
code for a perm series is dead. This patch removes it and also adds
a function-level comment to shuffle_series_patterns.
Regtested on rv64gcv_zvfh_zvbb.
Regards
Robin
gcc/ChangeLog:
* config/riscv/riscv-v.cc (expand_const_vector): Document.
(shuffle_extract_and_slide1up_patterns): Remove.
---
gcc/config/riscv/riscv-v.cc | 26 ++++----------------------
1 file changed, 4 insertions(+), 22 deletions(-)
diff --git a/gcc/config/riscv/riscv-v.cc b/gcc/config/riscv/riscv-v.cc
index 8b41b9c7774..93c2dcd04e4 100644
--- a/gcc/config/riscv/riscv-v.cc
+++ b/gcc/config/riscv/riscv-v.cc
@@ -1485,28 +1485,6 @@ expand_const_vector (rtx target, rtx src)
emit_vlmax_insn (code_for_pred_merge (mode), MERGE_OP, ops);
}
}
- else if (npatterns == 1 && nelts_per_pattern == 3)
- {
- /* Generate the following CONST_VECTOR:
- { base0, base1, base1 + step, base1 + step * 2, ... } */
- rtx base0 = builder.elt (0);
- rtx base1 = builder.elt (1);
- rtx base2 = builder.elt (2);
-
- rtx step = simplify_binary_operation (MINUS, builder.inner_mode (),
- base2, base1);
-
- /* Step 1 - { base1, base1 + step, base1 + step * 2, ... } */
- rtx tmp = gen_reg_rtx (mode);
- expand_vec_series (tmp, base1, step);
- /* Step 2 - { base0, base1, base1 + step, base1 + step * 2, ... } */
- if (!rtx_equal_p (base0, const0_rtx))
- base0 = force_reg (builder.inner_mode (), base0);
-
- insn_code icode = optab_handler (vec_shl_insert_optab, mode);
- gcc_assert (icode != CODE_FOR_nothing);
- emit_insn (GEN_FCN (icode) (target, tmp, base0));
- }
else
/* TODO: We will enable more variable-length vector in the future. */
gcc_unreachable ();
@@ -3580,6 +3558,10 @@ shuffle_extract_and_slide1up_patterns (struct expand_vec_perm_d *d)
return true;
}
+/* This looks for a series pattern in the provided vector permute structure D.
+ If successful it emits a series insn as well as a gather to implement it.
+ Return true if successful, false otherwise. */
+
static bool
shuffle_series_patterns (struct expand_vec_perm_d *d)
{
--
2.45.0
next reply other threads:[~2024-05-17 15:27 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-05-17 15:27 Robin Dapp [this message]
2024-05-18 0:33 ` Jeff Law
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=1d8f76e3-bc27-4802-823a-fe205ace590c@gmail.com \
--to=rdapp.gcc@gmail.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).