Message ID | 20230327103707.1253143-1-chenyixuan@iscas.ac.cn |
---|---|
State | New |
Headers |
Return-Path: <gcc-patches-bounces+patchwork=sourceware.org@gcc.gnu.org> X-Original-To: patchwork@sourceware.org Delivered-To: patchwork@sourceware.org Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 9AB46385842D for <patchwork@sourceware.org>; Mon, 27 Mar 2023 10:37:35 +0000 (GMT) X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org Received: from cstnet.cn (smtp25.cstnet.cn [159.226.251.25]) by sourceware.org (Postfix) with ESMTP id 90CC13858D39 for <gcc-patches@gcc.gnu.org>; Mon, 27 Mar 2023 10:37:17 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 90CC13858D39 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=iscas.ac.cn Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=iscas.ac.cn Received: from shellder.felixc.at (unknown [47.251.42.28]) by APP-05 (Coremail) with SMTP id zQCowADX32fWcSFkYNbJCg--.7221S2; Mon, 27 Mar 2023 18:37:12 +0800 (CST) From: chenyixuan@iscas.ac.cn To: gcc-patches@gcc.gnu.org Cc: kito.cheng@gmail.com, andrew@sifive.com, oriachiuan@gmail.com, jiawei@iscas.ac.cn, shihua@iscas.ac.cn, shiyulong@iscas.ac.cn, Yixuan Chen <chenyixuan@iscas.ac.cn> Subject: [PATCH] Changed vector size Date: Mon, 27 Mar 2023 18:37:07 +0800 Message-Id: <20230327103707.1253143-1-chenyixuan@iscas.ac.cn> X-Mailer: git-send-email 2.40.0 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-CM-TRANSID: zQCowADX32fWcSFkYNbJCg--.7221S2 X-Coremail-Antispam: 1UD129KBjvdXoW7Wr1UWFyxur1fJry3Ww48JFb_yoWDJFgEg3 48Zrs0qr4UAF1Fyr1kJrWUAFWIvF4DXrWSqws5KFsrXF1qqa12yr4kWFy0vF18Cry8XFy3 KF4aqrWYgrZ8WjkaLaAFLSUrUUUUjb8apTn2vfkv8UJUUUU8Yxn0WfASr-VFAUDa7-sFnT 9fnUUIcSsGvfJTRUUUbxxFF20E14v26r4j6ryUM7CY07I20VC2zVCF04k26cxKx2IYs7xG 6rWj6s0DM7CIcVAFz4kK6r1j6r18M28lY4IEw2IIxxk0rwA2F7IY1VAKz4vEj48ve4kI8w A2z4x0Y4vE2Ix0cI8IcVAFwI0_JFI_Gr1l84ACjcxK6xIIjxv20xvEc7CjxVAFwI0_Gr0_ Cr1l84ACjcxK6I8E87Iv67AKxVWxJr0_GcWl84ACjcxK6I8E87Iv6xkF7I0E14v26rxl6s 0DM2AIxVAIcxkEcVAq07x20xvEncxIr21l5I8CrVACY4xI64kE6c02F40Ex7xfMcIj6xII jxv20xvE14v26r1Y6r17McIj6I8E87Iv67AKxVWUJVW8JwAm72CE4IkC6x0Yz7v_Jr0_Gr 1lF7xvr2IYc2Ij64vIr41lF7I21c0EjII2zVCS5cI20VAGYxC7M4kE6xkIj40Ew7xC0wCY 02Avz4vE174l42xK82IYc2Ij64vIr41l4I8I3I0E4IkC6x0Yz7v_Jr0_Gr1lx2IqxVAqx4 xG67AKxVWUJVWUGwC20s026x8GjcxK67AKxVWUGVWUWwC2zVAF1VAY17CE14v26r1q6r43 MIIYrxkI7VAKI48JMIIF0xvE2Ix0cI8IcVAFwI0_Jr0_JF4lIxAIcVC0I7IYx2IY6xkF7I 0E14v26r4j6F4UMIIF0xvE42xK8VAvwI8IcIk0rVWUJVWUCwCI42IY6I8E87Iv67AKxVWU JVW8JwCI42IY6I8E87Iv6xkF7I0E14v26r4j6r4UJbIYCTnIWIevJa73UjIFyTuYvjfUUK ZXUUUUU X-Originating-IP: [47.251.42.28] X-CM-SenderInfo: xfkh05pl0xt046lvutnvoduhdfq/ X-Spam-Status: No, score=-13.8 required=5.0 tests=BAYES_00, GIT_PATCH_0, KAM_DMARC_STATUS, SPF_HELO_PASS, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org X-BeenThere: gcc-patches@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-patches mailing list <gcc-patches.gcc.gnu.org> List-Unsubscribe: <https://gcc.gnu.org/mailman/options/gcc-patches>, <mailto:gcc-patches-request@gcc.gnu.org?subject=unsubscribe> List-Archive: <https://gcc.gnu.org/pipermail/gcc-patches/> List-Post: <mailto:gcc-patches@gcc.gnu.org> List-Help: <mailto:gcc-patches-request@gcc.gnu.org?subject=help> List-Subscribe: <https://gcc.gnu.org/mailman/listinfo/gcc-patches>, <mailto:gcc-patches-request@gcc.gnu.org?subject=subscribe> Errors-To: gcc-patches-bounces+patchwork=sourceware.org@gcc.gnu.org Sender: "Gcc-patches" <gcc-patches-bounces+patchwork=sourceware.org@gcc.gnu.org> |
Series |
Changed vector size
|
|
Commit Message
陈逸轩
March 27, 2023, 10:37 a.m. UTC
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.
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(-)
Comments
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 >
Thanks for your suggestion!But I met the issue that if I declare a int type variable,this variable can't be converted to vector type. Could you teach me more detail? Best regards! Yixuan Chen "Richard Biener" <richard.guenther@gmail.com>wrote: > 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 > >
On Wed, Mar 29, 2023 at 10:35 AM 陈逸轩 <chenyixuan@iscas.ac.cn> wrote: > > Thanks for your suggestion!But I met the issue that if I declare a int type variable,this variable can't be converted to vector type. Could you teach me more detail? I don't understand what you mean. I have pushed a fix. Richard. > Best regards! > Yixuan Chen > > "Richard Biener" <richard.guenther@gmail.com>wrote: > > 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 > > >
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) {