On Mon, Aug 10, 2026 at 2:47 PM H.J. Lu <[email protected]> wrote:
>
> On Mon, Aug 10, 2026 at 2:11 PM <[email protected]> wrote:
> >
> > From: Kyrylo Tkachov <[email protected]>
> >
> > I messed up with the effective targets on this test twice, would appreciate
> > some direction on how to fix this up properly.
> > The test needs V2SImode vectors effectively. They come by default on
> > aarch64,
> > but on arm they require Neon, and on x86 they required x86_64 and AVX512
> >
> > In this patch I've restricted it to just aarch64, arm, and x86 and peppered
> > it
> > with the required effective targets and add-options.
> > This seems to work for arm, aarch64, and x86.
> > Is this okay to apply?
> > Thanks,
> > Kyrill
> >
> > gcc/testsuite/ChangeLog:
> >
> > * g++.dg/tree-ssa/vec-narrow-1.C: Require a capable vector
> > target and option set.
> >
> > Signed-off-by: Kyrylo Tkachov <[email protected]>
> > ---
> > gcc/testsuite/g++.dg/tree-ssa/vec-narrow-1.C | 5 ++++-
> > 1 file changed, 4 insertions(+), 1 deletion(-)
> >
> > diff --git a/gcc/testsuite/g++.dg/tree-ssa/vec-narrow-1.C
> > b/gcc/testsuite/g++.dg/tree-ssa/vec-narrow-1.C
> > index cec5b0ba345..a1925b41b4a 100644
> > --- a/gcc/testsuite/g++.dg/tree-ssa/vec-narrow-1.C
> > +++ b/gcc/testsuite/g++.dg/tree-ssa/vec-narrow-1.C
> > @@ -1,5 +1,8 @@
> > -// { dg-do compile }
> > +// { dg-do compile { target { aarch64*-*-* arm*-*-* i?86-*-* x86_64-*-* }
> > } }
> > +// { dg-require-effective-target arm_neon_ok { target arm*-*-* } }
> > +// { dg-require-effective-target lp64 { target { i?86-*-* x86_64-*-* } } }
>
> Why does it only work with LP64?
Since this requires TARGET_MMX_WITH_SSE
#define TARGET_MMX_WITH_SSE (TARGET_64BIT && TARGET_SSE2)
> > // { dg-options "-O2 -fdump-tree-optimized" }
> > +// { dg-add-options arm_neon }
> > // { dg-additional-options "-mavx512vl -mavx512dq" { target { i?86-*-*
> > x86_64-*-* } } }
> > // Extension is monotone, so it commutes with the comparison and the outer
> > // truncation is exact. The argument is lanewise, so a widened vector
> > --
> > 2.50.1 (Apple Git-155)
> >
>
>
> --
> H.J.
--
H.J.