public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: Richard Biener <richard.guenther@gmail.com>
To: chenyixuan@iscas.ac.cn
Cc: gcc-patches@gcc.gnu.org, kito.cheng@gmail.com, andrew@sifive.com,
	 oriachiuan@gmail.com, jiawei@iscas.ac.cn, shihua@iscas.ac.cn,
	 shiyulong@iscas.ac.cn
Subject: Re: [PATCH] Changed vector size
Date: Mon, 27 Mar 2023 16:49:19 +0200	[thread overview]
Message-ID: <CAFiYyc0mOGo7ZRK-Bkg6aDu3A6fVMPqzQjo-O1pu63jPueEucg@mail.gmail.com> (raw)
In-Reply-To: <20230327103707.1253143-1-chenyixuan@iscas.ac.cn>

On Mon, Mar 27, 2023 at 12:37 PM <chenyixuan@iscas.ac.cn> wrote:
>
> From: Yixuan Chen <chenyixuan@iscas.ac.cn>
>
> Observed a vint type "ABS_EXPR" followed by extra 3 int type "ABS_EXPR". If want to test absolute value optimization for vector, maybe don't need 4 times.

A better solution would be to scan a dump before the veclower pass?

> gcc/testsuite/ChangeLog:
>
> 2023-03-27  Yixuan Chen  <chenyixuan@iscas.ac.cn>
>
>         * g++.dg/pr94920.C: Declare the vector size as long as int.
>
> ---
>  gcc/testsuite/g++.dg/pr94920.C | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/gcc/testsuite/g++.dg/pr94920.C b/gcc/testsuite/g++.dg/pr94920.C
> index 126b00478d2..498bef93b3a 100644
> --- a/gcc/testsuite/g++.dg/pr94920.C
> +++ b/gcc/testsuite/g++.dg/pr94920.C
> @@ -2,7 +2,7 @@
>  /* { dg-do compile } */
>  /* { dg-options "-O2 -Wno-psabi -fdump-tree-optimized" } */
>
> -typedef int __attribute__((vector_size(4*sizeof(int)))) vint;
> +typedef int __attribute__((vector_size(sizeof(int)))) vint;
>
>  /* Same form as PR.  */
>  __attribute__((noipa)) unsigned int foo(int x) {
> --
> 2.40.0
>

  reply	other threads:[~2023-03-27 14:49 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-03-27 10:37 chenyixuan
2023-03-27 14:49 ` Richard Biener [this message]
2023-03-29  8:34   ` 陈逸轩
2023-03-29  8:47     ` Richard Biener

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=CAFiYyc0mOGo7ZRK-Bkg6aDu3A6fVMPqzQjo-O1pu63jPueEucg@mail.gmail.com \
    --to=richard.guenther@gmail.com \
    --cc=andrew@sifive.com \
    --cc=chenyixuan@iscas.ac.cn \
    --cc=gcc-patches@gcc.gnu.org \
    --cc=jiawei@iscas.ac.cn \
    --cc=kito.cheng@gmail.com \
    --cc=oriachiuan@gmail.com \
    --cc=shihua@iscas.ac.cn \
    --cc=shiyulong@iscas.ac.cn \
    /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).