From: Richard Biener <rguenther@suse.de>
To: Hongtao Liu <crazylht@gmail.com>
Cc: "sunil.k.pandey" <skpandey@sc.intel.com>,
Richard Sandiford <richard.sandiford@arm.com>,
GCC Patches <gcc-patches@gcc.gnu.org>
Subject: Re: [r12-3893 Regression] FAIL: gcc.target/i386/vect-pr97352.c scan-assembler-times vmov.pd 4 on Linux/x86_64
Date: Tue, 28 Sep 2021 10:18:56 +0200 (CEST) [thread overview]
Message-ID: <or219oqr-0q4-q93n-n75q-sn9527102p3@fhfr.qr> (raw)
In-Reply-To: <so3nq384-p0rr-pn16-6q9p-os6r223q62sr@fhfr.qr>
On Tue, 28 Sep 2021, Richard Biener wrote:
> On Tue, 28 Sep 2021, Hongtao Liu wrote:
>
> > On Tue, Sep 28, 2021 at 2:59 PM Richard Biener via Gcc-patches
> > <gcc-patches@gcc.gnu.org> wrote:
> > >
> > > On Mon, 27 Sep 2021, sunil.k.pandey wrote:
> > >
> > > > On Linux/x86_64,
> > > >
> > > > 6390c5047adb75960f86d56582e6322aaa4d9281 is the first bad commit
> > > > commit 6390c5047adb75960f86d56582e6322aaa4d9281
> > > > Author: Richard Biener <rguenther@suse.de>
> > > > Date: Wed Nov 18 09:36:57 2020 +0100
> > > >
> > > > Allow different vector types for stmt groups
> > > >
> > > > caused
> > > >
> > > > FAIL: gcc.dg/vect/bb-slp-17.c -flto -ffat-lto-objects scan-tree-dump-times slp2 "optimized: basic block" 1
> > > > FAIL: gcc.dg/vect/bb-slp-17.c scan-tree-dump-times slp2 "optimized: basic block" 1
> > >
> > > This shows that it is maybe a bad idea to support V2SImode vectorization
> > > with -m32 when we refuse to implement even plus.
> > >
> > > OTOH it's just the mode that's available, autovectorize_vector_modes
> > > doesn't include the corresponding mode but we still pick it up via
> > > the related vector mode for group-size == 2.
>
> It looks like we could define the vectorize.related_mode hook to
> reject V2SImode when !TARGET_MMX_WITH_SSE - the default implementation
> just checks for vector_mode_supported_p.
Meh, that doesn't work. We then fall through
else if (SCALAR_INT_MODE_P (prevailing_mode)
|| !related_vector_mode (prevailing_mode,
inner_mode, nunits).exists
(&simd_mode))
{
/* Fall back to using mode_for_vector, mostly in the hope of being
able to use an integer mode. */
if (known_eq (nunits, 0U)
&& !multiple_p (GET_MODE_SIZE (prevailing_mode), nbytes,
&nunits))
return NULL_TREE;
if (!mode_for_vector (inner_mode, nunits).exists (&simd_mode))
return NULL_TREE;
and return V2SImode anyway from mode_for_vector ...
So - should we only allow integer modes here as the comment suggests?
With that, thus
if (!mode_for_vector (inner_mode, nunits).exists (&simd_mode)
|| GET_MODE_CLASS (simd_mode) != MODE_INT)
return NULL_TREE;
we "properly" _not_ use V2SImode for vectorization on x86 when
!TARGET_MMX_WITH_SSE. Note that will also not use V2SImode
for vectorizing copies (which are properly supported). So I'm
not sure rejecting V2SImode outright is "proper" ...
Richard.
prev parent reply other threads:[~2021-09-28 8:18 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-09-27 18:28 sunil.k.pandey
2021-09-28 6:59 ` Richard Biener
2021-09-28 7:43 ` Hongtao Liu
2021-09-28 8:02 ` Richard Biener
2021-09-28 8:18 ` Richard Biener [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=or219oqr-0q4-q93n-n75q-sn9527102p3@fhfr.qr \
--to=rguenther@suse.de \
--cc=crazylht@gmail.com \
--cc=gcc-patches@gcc.gnu.org \
--cc=richard.sandiford@arm.com \
--cc=skpandey@sc.intel.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).