On Tue, Jul 28, 2020 at 10:13:31PM +0100, Roger Sayle wrote: [ You attached something binary, which makes it hard to reply to. ]
> --- /dev/null > +++ b/gcc/testsuite/gcc.dg/pr96298.c > @@ -0,0 +1,19 @@ > +/* PR rtl-optimization/96298 */ > +/* { dg-do run } */ > +/* { dg-options "-O2 -fno-tree-forwprop" } */ > +/* { dg-additional-options "-mno-sse" { target x86_64-*-* i?86-*-* } } */ I would do a test with these target flags in gcc.target/i386/, and one without any in gcc.dg? It looks fine to me either way, I think you can use vector_size like this on any target. Segher > +typedef unsigned char __attribute__ ((__vector_size__ (8))) v64u8; > + > +v64u8 a; > + > +int > +main (void) > +{ > + v64u8 x = (a - 1) ^ -a; > + for (unsigned i = 0; i < sizeof (x); i++) > + if (x[i] != 0xff) > + __builtin_abort (); > + return 0; > +}