On Wed, 26 Aug 2026, [email protected] wrote: > From: Kyrylo Tkachov <[email protected]> > > vec-mask-zero-1.c tests a forwprop simplification, but scans the final > optimized GIMPLE. On targets that do not support the V4SI > operations, vector lowering splits the operations and changes the dump > counts. > > No vector effective-target combination describes all the V4SI comparisons > and bitwise operations used by the test. These checks are also not reliable > outside vect.exp. > > Restrict the test to AArch64 and the general x86 effective target. Add SSE2 > on x86, where all the operations are supported. Scan forwprop1, after the > simplifications and before target-specific vector lowering. > > Tested on AArch64 and x86_64 with -m64 and -m32. > Ok for trunk?
OK. > Thanks, > Kyrill > > gcc/testsuite/ChangeLog: > > PR tree-optimization/127069 > * gcc.dg/tree-ssa/vec-mask-zero-1.c: Restrict to AArch64 and x86 with > SSE2. Scan forwprop1. > > Signed-off-by: Kyrylo Tkachov <[email protected]> > --- > gcc/testsuite/gcc.dg/tree-ssa/vec-mask-zero-1.c | 17 +++++++++-------- > 1 file changed, 9 insertions(+), 8 deletions(-) > > diff --git a/gcc/testsuite/gcc.dg/tree-ssa/vec-mask-zero-1.c > b/gcc/testsuite/gcc.dg/tree-ssa/vec-mask-zero-1.c > index 835c23fc06d..92f38d928a6 100644 > --- a/gcc/testsuite/gcc.dg/tree-ssa/vec-mask-zero-1.c > +++ b/gcc/testsuite/gcc.dg/tree-ssa/vec-mask-zero-1.c > @@ -1,6 +1,6 @@ > -/* { dg-do compile { target { vect_int && vect128 } } } */ > -/* { dg-options "-O2 -fdump-tree-optimized -Wno-psabi" } */ > -/* { dg-additional-options "-msse2" { target ia32 } } */ > +/* { dg-do compile { target { x86 || aarch64*-*-* } } } */ > +/* { dg-options "-O2 -fdump-tree-forwprop1 -Wno-psabi" } */ > +/* { dg-additional-options "-msse2" { target x86 } } */ > /* Combine pairs of vector comparisons against zero or all-ones. Use > different signedness for the operands to exercise the view conversion. */ > typedef int v4si __attribute__((vector_size (16))); > @@ -11,8 +11,9 @@ v4si f2 (v4si a, v4ui b) { return (a != 0) | (b != 0); } > v4si f3 (v4si a, v4ui b) { return (a == -1) & (b == -1u); } > v4si f4 (v4si a, v4ui b) { return (a != -1) | (b != -1u); } > > -/* Each function keeps one bitwise operation and one comparison. */ > -/* { dg-final { scan-tree-dump-times " == " 2 "optimized" } } */ > -/* { dg-final { scan-tree-dump-times " != " 2 "optimized" } } */ > -/* { dg-final { scan-tree-dump-times " \\| " 2 "optimized" } } */ > -/* { dg-final { scan-tree-dump-times " & " 2 "optimized" } } */ > +/* Each function keeps one bitwise operation and one comparison before > + target-specific vector lowering. */ > +/* { dg-final { scan-tree-dump-times " == " 2 "forwprop1" } } */ > +/* { dg-final { scan-tree-dump-times " != " 2 "forwprop1" } } */ > +/* { dg-final { scan-tree-dump-times " \\| " 2 "forwprop1" } } */ > +/* { dg-final { scan-tree-dump-times " & " 2 "forwprop1" } } */ > -- Richard Biener <[email protected]> SUSE Software Solutions Germany GmbH, Frankenstrasse 146, 90461 Nuernberg, Germany; GF: Jochen Jaser, Andrew McDonald, Abhinav Puri; (HRB 36809, AG Nuernberg)
