1 /* Verify that overloaded built-ins for vec_neg with char
2 inputs produce the right code. */
3
4 /* { dg-do compile } */
5 /* { dg-require-effective-target powerpc_p8vector_ok } */
6 /* { dg-options "-mvsx -O2 -mcpu=power8" } */
7 /* { dg-skip-if "do not override -mcpu" { powerpc*-*-* } { "-mcpu=*" } { "-mcpu=power8" } } */
8
9 #include <altivec.h>
10
11 vector signed char
test2(vector signed char x)12 test2 (vector signed char 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 "vsububm" 1 } } */
19 /* { dg-final { scan-assembler-times "vmaxsb" 0 } } */
20
21