public inbox for gcc-regression@sourceware.org
help / color / mirror / Atom feed
From: "Andre Vieira (lists)" <andre.simoesdiasvieira@arm.com>
To: Richard Biener <richard.guenther@gmail.com>
Cc: Andrew Stubbs <ams@codesourcery.com>,
"gcc-regression@gcc.gnu.org" <gcc-regression@gcc.gnu.org>,
"gcc-patches@gcc.gnu.org" <gcc-patches@gcc.gnu.org>,
"haochen.jiang@intel.com" <haochen.jiang@intel.com>
Subject: Re: [r13-7135 Regression] FAIL: gcc.dg/vect/vect-simd-clone-18f.c scan-tree-dump-times vect "[\\n\\r] [^\\n]* = foo\\.simdclone" 2 on Linux/x86_64
Date: Fri, 14 Apr 2023 13:57:46 +0100 [thread overview]
Message-ID: <e46797fd-d41a-141e-343f-787a84185947@arm.com> (raw)
In-Reply-To: <CAFiYyc2TR02JENVw+ahAhYSxrWAm=jPTO-=KVnMB_y8PsET9JA@mail.gmail.com>
On 14/04/2023 12:47, Richard Biener wrote:
> On Fri, Apr 14, 2023 at 11:42 AM Andre Vieira (lists)
> <andre.simoesdiasvieira@arm.com> wrote:
>>
>>
>
> Ah, but then vect_get_smallest_scalar_type should simply ignore that
> pointer in MASK_CALL. It should only look at the arguments relevant
> for vectorization. So
>
> diff --git a/gcc/tree-vect-data-refs.cc b/gcc/tree-vect-data-refs.cc
> index 8daf7bd7dd3..70bb8595951 100644
> --- a/gcc/tree-vect-data-refs.cc
> +++ b/gcc/tree-vect-data-refs.cc
> @@ -165,6 +165,8 @@ vect_get_smallest_scalar_type (stmt_vec_info
> stmt_info, tree scalar_type)
> }
> else if (internal_fn_mask_index (ifn) == 0)
> i = 1;
> + else if (ifn == IFN_MASK_CALL)
> + i = 1;
> }
> if (i < gimple_call_num_args (call))
> {
>
> ?
The problem with that is that not all arguments of a simdclone are
mapped to vectors, for instance if one of them is 'uniform' then it's
passed as a single scalar as uniform says it won't change between
iteration, thus it has no effect on VF.
End of the day, the logic behind VF selection for simd clones is very
different to that of a normal statement. Take for instance the logic
behind simdlen selection for SVE, its not yet in trunk, where we select
the number of elements to handle based on the widest element type. So say a:
#pragma omp declare simd
int foo (int, long long);
would have 4 NEON simd clones with (based on Narrowest element type):
/* 128 bit */
V4SI foo (V4SI, V4DI)
V4SI foo (V4SI, V4DI, V4BI)
/* 64 bit */
V2SI foo (V2SI, V2DI)
V2SI foo (V2SI, V2DI, V2BI)
and SVE (based on Widest element type):
VNx2SI foo (VN2xSI, VN2xDI, VN2xBI)
This also shows how basing this on the return value wouldn't quite work
either for SVE :(
For now I think all targets base the selection on narrowest element type
and I think we could get away with only looking at the types that map to
vectors using the simdclone information, that's a pretty straight
forward change to the existing code I think. And I'll make sure to come
up with a way of dealing with this in a more robust way for SVE to work.
I'll try to write something up, but probably won't be able to post it
until Monday.
Kind regards,
Andre
prev parent reply other threads:[~2023-04-14 12:57 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-04-13 1:48 haochen.jiang
2023-04-13 9:15 ` Andre Simoes Dias Vieira
2023-04-13 10:01 ` Andrew Stubbs
2023-04-13 12:59 ` Andre Vieira (lists)
2023-04-13 14:00 ` Richard Biener
2023-04-13 14:25 ` Andre Vieira (lists)
2023-04-14 6:55 ` Richard Biener
2023-04-14 8:43 ` Andre Vieira (lists)
2023-04-14 9:09 ` Richard Biener
2023-04-14 9:14 ` Richard Biener
2023-04-14 9:42 ` Andre Vieira (lists)
2023-04-14 11:47 ` Richard Biener
2023-04-14 12:57 ` Andre Vieira (lists) [this message]
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=e46797fd-d41a-141e-343f-787a84185947@arm.com \
--to=andre.simoesdiasvieira@arm.com \
--cc=ams@codesourcery.com \
--cc=gcc-patches@gcc.gnu.org \
--cc=gcc-regression@gcc.gnu.org \
--cc=haochen.jiang@intel.com \
--cc=richard.guenther@gmail.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).