Hi! On Tue, Aug 07, 2018 at 02:25:06PM -0500, Will Schmidt wrote: > Some testcases to exercise the vec_splat() built-in.
> In building and updating these tests I consciously violated the > 80 char per line rule, as I was doing experimentation with the > assorted values and making lots of local updates. I've left them as-is > just because, but can update that if so desired. That is fine in testcases (and even practically unavoidable in many dg statements). > +// vec_splat() using variable vectors should generate the vspltb instruction. > +/* { dg-final { scan-assembler-times "vspltb" 24 } } */ > +// vec_splat() using a constant vector should generate a load. > +/* { dg-final { scan-assembler-times {\mlvx\M|\mlxvw4x\M} 3 } } */ You may want to use {} and \m\M everywhere, for symmetry and for future- proofing things a bit. It's not necessary of course. > --- /dev/null > +++ b/gcc/testsuite/gcc.target/powerpc/fold-vec-splat-floatdouble.c > @@ -0,0 +1,54 @@ > +/* Verify that overloaded built-ins for vec_splat with float and > + double inputs produce the right code. */ > + > +/* { dg-do compile } */ > +/* { dg-require-effective-target powerpc_vsx_ok } */ > +/* { dg-options "-maltivec -mvsx -O1" } */ -mvsx implies -maltivec. Is there any reason some of these tests use -O2 and some use -O1? > new file mode 100644 > index 0000000..729b0cc > --- /dev/null > +++ b/gcc/testsuite/gcc.target/powerpc/fold-vec-splat-longlong.c > @@ -0,0 +1,62 @@ > +/* Verify that overloaded built-ins for vec_splat with long long > + inputs produce the right code. */ > + > +/* { dg-do compile } */ > +/* { dg-require-effective-target powerpc_p8vector_ok } */ > +/* { dg-options "-mvsx -O2" } */ What is that p8vector_ok for? You don't force p8 vector support on. I think you can remove this. Okay for trunk with that last one resolved. Thanks! Segher