On Wed, Mar 29, 2023 at 10:35 AM 陈逸轩 <chenyix...@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
>
> &quot;Richard Biener&quot; &lt;richard.guent...@gmail.com&gt;wrote:
> > On Mon, Mar 27, 2023 at 12:37 PM <chenyix...@iscas.ac.cn> wrote:
> > >
> > > From: Yixuan Chen <chenyix...@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  <chenyix...@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 via email to