public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: Richard Biener <richard.guenther@gmail.com>
To: Lulu Cheng <chenglulu@loongson.cn>
Cc: Xi Ruoyao <xry111@xry111.site>, Levy <admin@levyhsu.com>,
	wilson@tuliptree.org,  gcc-patches@gcc.gnu.org,
	Liwei Xu <liwei.xu@intel.com>
Subject: Re: [PATCH] Optimize nested permutation to single VEC_PERM_EXPR [PR54346]
Date: Thu, 13 Oct 2022 13:10:52 +0200	[thread overview]
Message-ID: <CAFiYyc2x8s2oA2Esg5X3cr0ihctKo98Z-qr+9_Yc7Z+fZN-1hg@mail.gmail.com> (raw)
In-Reply-To: <b1f7a658-d330-9661-376a-3927434490d9@loongson.cn>

On Thu, Oct 13, 2022 at 10:16 AM Lulu Cheng <chenglulu@loongson.cn> wrote:
>
>
> 在 2022/10/13 下午2:44, Xi Ruoyao 写道:
> > On Thu, 2022-10-13 at 14:15 +0800, Levy wrote:
> >> Hi RuoYao
> >>
> >> It’s probably because loongarch64 doesn’t support
> >> can_vec_perm_const_p(result_mode, op_mode, sel2, false)
> >>
> >> I’m not sure whether if loongarch will support it or should I just
> >> limit the test target for pr54346.c?
> > I'm not sure if we can add TARGET_VECTORIZE_VEC_PERM_CONST when we don't
> > actually support vector.  (LoongArch has SIMD instructions but the
> > support in GCC won't be added in a very recent future.)
> >
> If what I understand is correct, I think this might be a better solution.
>
>   /* { dg-do compile } */
>
> +/* { dg-require-effective-target vect_perm } */
>   /* { dg-options "-O -fdump-tree-dse1" } */

Btw, what forwprop does is check whether any of the original permutations are
not supported and then elide the supportability check for the result.
The reasoning
is that the original permute(s) would be lowered during vectlower so we can as
well do that for the result.  We should just never turn a supported permutation
sequence into a not supported one.

Richard.

>

  reply	other threads:[~2022-10-13 11:11 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-09-26  6:56 Liwei Xu
2022-09-26  8:21 ` Richard Biener
2022-09-30  9:17   ` Richard Sandiford
2022-09-30  9:36     ` Xu, Liwei
2022-10-12 13:51 ` Xi Ruoyao
2022-10-13  6:15   ` Levy
2022-10-13  6:44     ` Xi Ruoyao
2022-10-13  8:15       ` Lulu Cheng
2022-10-13 11:10         ` Richard Biener [this message]
2022-10-14  1:09           ` Xu, Liwei
2022-10-14  1:49           ` Lulu Cheng
2022-10-14  6:18             ` Richard Biener
2022-10-14  6:34               ` Xu, Liwei

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=CAFiYyc2x8s2oA2Esg5X3cr0ihctKo98Z-qr+9_Yc7Z+fZN-1hg@mail.gmail.com \
    --to=richard.guenther@gmail.com \
    --cc=admin@levyhsu.com \
    --cc=chenglulu@loongson.cn \
    --cc=gcc-patches@gcc.gnu.org \
    --cc=liwei.xu@intel.com \
    --cc=wilson@tuliptree.org \
    --cc=xry111@xry111.site \
    /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).