From: Marc Glisse <marc.glisse@inria.fr>
To: James Greenhalgh <james.greenhalgh@arm.com>
Cc: gcc-patches@gcc.gnu.org, nd@arm.com, law@redhat.com
Subject: Re: [Patch combine] Don't create vector mode ZERO_EXTEND from subregs
Date: Sat, 16 Dec 2017 14:04:00 -0000 [thread overview]
Message-ID: <alpine.DEB.2.21.1712161501250.4805@stedding.saclay.inria.fr> (raw)
In-Reply-To: <1513001933-17348-1-git-send-email-james.greenhalgh@arm.com>
I was happily going to close PR 55549, but it looks like we are trying the
same transformation in a second place in that file :-(
On Mon, 11 Dec 2017, James Greenhalgh wrote:
> Hi,
>
> In simplify_set we try transforming the paradoxical subreg expression:
>
> (set FOO (subreg:M (mem:N BAR) 0))
>
> in to:
>
> (set FOO (zero_extend:M (mem:N BAR)))
>
> However, this code does not consider the case where M is a vector
> mode, allowing it to construct (for example):
>
> (zero_extend:V4SI (mem:SI))
>
> This would clearly have the wrong semantics, but fortunately we fail long
> before then in expand_compound_operation. As we really don't want a vector
> zero_extend of a scalar value.
>
> We need to explicitly reject vector modes from this transformation.
>
> This fixes a failure I'm seeing on a branch in which I'm trying to
> tackle some performance regressions, so I have no live testcase for
> this, but it is wrong by observation.
>
> Tested on aarch64-none-elf and bootstrapped on aarch64-none-linux-gnu with
> no issues.
>
> OK?
>
> Thanks,
> James
>
> ---
> 2017-12-11 James Greenhalgh <james.greenhalgh@arm.com>
>
> * combine.c (simplify_set): Do not transform subregs to zero_extends
> if the destination mode is a vector mode.
>
>
--
Marc Glisse
next prev parent reply other threads:[~2017-12-16 14:04 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-12-11 14:19 James Greenhalgh
2017-12-11 15:46 ` [patch AArch64] Do not perform a vector splat for vector initialisation if it is not useful James Greenhalgh
2017-12-18 23:37 ` Jeff Law
2018-01-03 9:55 ` Christophe Lyon
2017-12-11 21:29 ` [Patch combine] Don't create vector mode ZERO_EXTEND from subregs Jeff Law
2017-12-16 14:04 ` Marc Glisse [this message]
2017-12-17 3:14 ` Segher Boessenkool
2017-12-21 16:35 ` James Greenhalgh
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=alpine.DEB.2.21.1712161501250.4805@stedding.saclay.inria.fr \
--to=marc.glisse@inria.fr \
--cc=gcc-patches@gcc.gnu.org \
--cc=james.greenhalgh@arm.com \
--cc=law@redhat.com \
--cc=nd@arm.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).