On Dez 06 2016, "Carl E. Love" <c...@us.ibm.com> wrote: > diff --git a/gcc/testsuite/gcc.target/powerpc/builtins-3-p9.c > b/gcc/testsuite/gcc.target/powerpc/builtins-3-p9.c > new file mode 100644 > index 0000000..d846e29 > --- /dev/null > +++ b/gcc/testsuite/gcc.target/powerpc/builtins-3-p9.c > @@ -0,0 +1,42 @@ > +/* { dg-do compile } */ > +/* { dg-require-effective-target powerpc_p9vector_ok } */ > +/* { dg-options "-mcpu=power9" } */ > + > +#include <altivec.h> > + > +vector bool char > +test_ne_char (vector bool char x, vector bool char y) > +{ > + return vec_cmpne (x, y); > +} > + > +vector bool short > +test_ne_short (vector bool short x, vector bool short y) > +{ > + return vec_cmpne (x, y); > +} > + > +vector bool int > +test_ne_int (vector bool int x, vector bool int y) > +{ > + return vec_cmpne (x, y); > +} > + > +vector bool long > +test_ne_long (vector bool long x, vector bool long y) > +{ > + return vec_cmpne (x, y); > +} > + > +/* Expected test results: > + > + test_ne_char 1 vcmpneb > + test_ne_short 1 vcmpneh > + test_ne_int 1 vcmpnew > + test_ne_long 1 vcmpequd, 1 xxlnor inst */ > + > +/* { dg-final { scan-assembler-times "vcmpneb" 1 } } */ > +/* { dg-final { scan-assembler-times "vcmpneh" 1 } } */ > +/* { dg-final { scan-assembler-times "vcmpnew" 1 } } */ > +/* { dg-final { scan-assembler-times "vcmpequd" 1 } } */ > +/* { dg-final { scan-assembler-times "xxlnor" 1 } } */
The last three fail with -m32. $ grep -c vcmpnew builtins-3-p9.s 2 $ grep -c vcmpequd builtins-3-p9.s 0 $ grep -c xxlnor builtins-3-p9.s 0 Andreas. -- Andreas Schwab, sch...@linux-m68k.org GPG Key fingerprint = 58CA 54C7 6D53 942B 1756 01D3 44D5 214B 8276 4ED5 "And now for something completely different."