On Mon, 2024-01-15 at 14:32 +0800, YunQiang Su wrote:
> Xi Ruoyao <xry...@xry111.site> 于2024年1月15日周一 12:11写道:
> > 
> > On Mon, 2024-01-15 at 09:29 +0800, chenxiaolong wrote:
> > > At 21:13 +0800 on Saturday, 2024-01-13, Xi Ruoyao wrote:
> > > > At 15:28 +0800 on Saturday 2024-01-13, chenxiaolong wrote:
> > > > > gcc/testsuite/ChangeLog:
> > > > > 
> > > > >   * gcc.dg/pr104992.c: Added additional "-mlsx" compilation
> > > > > options.
> > > > >   * gcc.dg/signbit-2.c: Dito.
> > > > >   * gcc.dg/tree-ssa/scev-16.c: Dito.
> > > > >   * gfortran.dg/graphite/vect-pr40979.f90: Dito.
> > > > >   * gfortran.dg/vect/fast-math-mgrid-resid.f: Dito.
> > > > 
> > > > I don't feel it right about the changes to pr104992.c and scev-16.c
> > > > because no other architectures add special options there.  Why are we
> > > > so special?
> > 
> > > 
> > > Because on the LoongArch architecture, GCC requires the addition of
> > > vectorization options in order to generate vector code. Use the
> > > check_effective_target_vect_cmdline_needed command in the lib/target-
> > > supports.exp file to set whether the command line option is needed to
> > > enable vectorizations. For example, ia64,x86,aarch64, and riscv
> > > architectures, vectorization is enabled by default.
> > 
> > But no.  The default baseline of 32-bit x86 is i686, which is basically
> > a Pentium III launched in 1999 without any vector instructions.
> > 
> > We are still missing something here.
> > 
> There is a line
>      #define vector __attribute__((vector_size(4*sizeof(int))))
> I guess it is the syntax needs to be supported.

This is always supported.  If the target does not have vector
instructions GCC will just expand vector arithmetic as a loop.

Maybe we should just move this test into gcc.dg/vect where the framework
automatically add options like -mlsx or -msse2?

-- 
Xi Ruoyao <xry...@xry111.site>
School of Aerospace Science and Technology, Xidian University

Reply via email to