From: Andre Vieira <andre.simoesdiasvieira@arm.com>
To: gcc-patches@gcc.gnu.org
Cc: Richard.Sandiford@arm.com, rguenther@suse.de,
Andre Vieira <andre.simoesdiasvieira@arm.com>
Subject: [PATCH 2/3] vect: disable multiple calls of poly simdclones
Date: Tue, 30 Jan 2024 14:31:31 +0000 [thread overview]
Message-ID: <20240130143132.9575-3-andre.simoesdiasvieira@arm.com> (raw)
In-Reply-To: <20240130143132.9575-1-andre.simoesdiasvieira@arm.com>
[-- Attachment #1: Type: text/plain, Size: 478 bytes --]
The current codegen code to support VF's that are multiples of a simdclone
simdlen rely on BIT_FIELD_REF to create multiple input vectors. This does not
work for non-constant simdclones, so we should disable using such clones when
the VF is a multiple of the non-constant simdlen until we change the codegen to
support those.
gcc/ChangeLog:
* tree-vect-stmts.cc (vectorizable_simd_clone_call): Reject simdclones
with non-constant simdlen when VF is not exactly the same.
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: 0002-vect-disable-multiple-calls-of-poly-simdclones.patch --]
[-- Type: text/x-patch; name="0002-vect-disable-multiple-calls-of-poly-simdclones.patch", Size: 763 bytes --]
diff --git a/gcc/tree-vect-stmts.cc b/gcc/tree-vect-stmts.cc
index da02082c034..9bfb898683d 100644
--- a/gcc/tree-vect-stmts.cc
+++ b/gcc/tree-vect-stmts.cc
@@ -4068,7 +4068,10 @@ vectorizable_simd_clone_call (vec_info *vinfo, stmt_vec_info stmt_info,
if (!constant_multiple_p (vf * group_size, n->simdclone->simdlen,
&num_calls)
|| (!n->simdclone->inbranch && (masked_call_offset > 0))
- || (nargs != simd_nargs))
+ || (nargs != simd_nargs)
+ /* Currently we do not support multiple calls of non-constant
+ simdlen as poly vectors can not be accessed by BIT_FIELD_REF. */
+ || (!n->simdclone->simdlen.is_constant () && num_calls != 1))
continue;
if (num_calls != 1)
this_badness += floor_log2 (num_calls) * 4096;
next prev parent reply other threads:[~2024-01-30 14:32 UTC|newest]
Thread overview: 23+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-01-30 14:31 [PATCH 0/3] vect, aarch64: Add SVE support for simdclones Andre Vieira
2024-01-30 14:31 ` [PATCH 1/3] vect: Pass stmt_vec_info to TARGET_SIMD_CLONE_USABLE Andre Vieira
2024-01-31 12:11 ` Richard Biener
2024-01-31 12:13 ` Richard Biener
2024-01-31 13:52 ` Andre Vieira (lists)
2024-01-31 13:58 ` Richard Biener
2024-01-31 14:03 ` Richard Biener
2024-01-31 16:13 ` Andre Vieira (lists)
2024-01-31 14:35 ` Andre Vieira (lists)
2024-01-31 14:35 ` Richard Biener
2024-01-31 16:36 ` Andre Vieira (lists)
2024-02-01 7:19 ` Richard Biener
2024-02-01 17:01 ` Andre Vieira (lists)
2024-02-05 9:56 ` Richard Biener
2024-02-26 16:56 ` Andre Vieira (lists)
2024-02-27 8:47 ` Richard Biener
2024-02-28 17:25 ` Andre Vieira (lists)
2024-02-29 7:26 ` Richard Biener
2024-02-01 7:59 ` Richard Sandiford
2024-01-30 14:31 ` Andre Vieira [this message]
2024-01-31 12:13 ` [PATCH 2/3] vect: disable multiple calls of poly simdclones Richard Biener
2024-01-30 14:31 ` [PATCH 3/3] aarch64: Add SVE support for simd clones [PR 96342] Andre Vieira
2024-02-01 21:59 ` 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=20240130143132.9575-3-andre.simoesdiasvieira@arm.com \
--to=andre.simoesdiasvieira@arm.com \
--cc=Richard.Sandiford@arm.com \
--cc=gcc-patches@gcc.gnu.org \
--cc=rguenther@suse.de \
/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).