public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: Richard Biener <richard.guenther@gmail.com>
To: "Andre Vieira (lists)" <andre.simoesdiasvieira@arm.com>
Cc: GCC Patches <gcc-patches@gcc.gnu.org>,
	Richard Sandiford <richard.sandiford@arm.com>
Subject: Re: [PATCH 4/4][RFC] VLA Constructor
Date: Mon, 8 Aug 2022 14:12:50 +0200	[thread overview]
Message-ID: <CAFiYyc2acbv4w5=wKMEJK=hSWXdGGdC_B2WvfoVSjjhPN1fFpg@mail.gmail.com> (raw)
In-Reply-To: <3f90f079-8c12-2547-c925-a28779fdb267@arm.com>

On Fri, Aug 5, 2022 at 2:59 PM Andre Vieira (lists) via Gcc-patches
<gcc-patches@gcc.gnu.org> wrote:
>
> This isn't really a 'PATCH' yet, it's something I was working on but had
> to put on hold. Feel free to re-use any bits or trash all of it if you'd
> like.

@@ -10264,6 +10264,44 @@ expand_expr_real_2 (sepops ops, rtx target,
machine_mode tmode,

     case VEC_PERM_EXPR:
       {
+       if (TREE_CODE (treeop2) == VECTOR_CST
+           && targetm.vectorize.vla_constructor)
+         {
+           tree ctor0, ctor1;
+           if (TREE_CODE (treeop0) == SSA_NAME
+               && is_gimple_assign (SSA_NAME_DEF_STMT (treeop0)))
+             ctor0 = gimple_assign_rhs1 (SSA_NAME_DEF_STMT (treeop0));
+           else
+             ctor0 = treeop0;
+           if (TREE_CODE (treeop1) == SSA_NAME
+               && is_gimple_assign (SSA_NAME_DEF_STMT (treeop1)))
+             ctor1 = gimple_assign_rhs1 (SSA_NAME_DEF_STMT (treeop1));

just to say - you can't lookup things like this, you have to go through the TER
machinery, otherwise the expansions for the CTOR elements might be
clobbered already.  That means to be fully effective doing this during RTL
expansion is likely limited.

      reply	other threads:[~2022-08-08 12:13 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-08-05 12:50 [PATCH 0/4] aarch64: Improve codegen for dups and constructors Andre Vieira (lists)
2022-08-05 12:53 ` [PATCH 1/4] aarch64: encourage use of GPR input for SIMD inserts Andre Vieira (lists)
2022-08-05 12:55 ` [PATCH 2/4]aarch64: Change aarch64_expand_vector_init to use rtx_vector_builder Andre Vieira (lists)
2022-08-05 12:56 ` [PATCH 3/4] match.pd: Teach forwprop to handle VLA VEC_PERM_EXPRs with VLS CONSTRUCTORs as arguments Andre Vieira (lists)
2022-08-05 14:53   ` Prathamesh Kulkarni
2022-08-05 12:58 ` [PATCH 4/4][RFC] VLA Constructor Andre Vieira (lists)
2022-08-08 12:12   ` 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='CAFiYyc2acbv4w5=wKMEJK=hSWXdGGdC_B2WvfoVSjjhPN1fFpg@mail.gmail.com' \
    --to=richard.guenther@gmail.com \
    --cc=andre.simoesdiasvieira@arm.com \
    --cc=gcc-patches@gcc.gnu.org \
    --cc=richard.sandiford@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).