Use conditional internal functions in if-conversion
[official-gcc.git] / gcc / testsuite / gcc.target / powerpc / fold-vec-neg-char.c
bloba1ef0e7e717cdb96cfff521dd0bd6ddec3461c37
1 /* Verify that overloaded built-ins for vec_neg with char
2 inputs produce the right code. */
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" } } */
9 #include <altivec.h>
11 vector signed char
12 test2 (vector signed char x)
14 return vec_neg (x);
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 } } */