1 /* Verify that overloaded built-ins for vec_neg with short
2    inputs produce the right code.  */
3 
4 /* { dg-do compile } */
5 /* { dg-require-effective-target powerpc_p8vector_ok } */
6 /* { dg-options "-mvsx -O2 -mdejagnu-cpu=power8" } */
7 
8 
9 #include <altivec.h>
10 
11 vector signed short
test3(vector signed short x)12 test3 (vector signed short x)
13 {
14   return vec_neg (x);
15 }
16 
17 /* { dg-final { scan-assembler-times "xxspltib|vspltisw|vxor" 1 } } */
18 /* { dg-final { scan-assembler-times "vsubuhm" 1 } } */
19 /* { dg-final { scan-assembler-times "vmaxsh" 0 } } */
20