[testsuite] require sqrt_insn effective target where needed
[official-gcc.git] / gcc / testsuite / gcc.target / powerpc / fold-vec-abs-int-fwrapv.p7.c
blobb27c8a3205d4d91c6d50d6cf5b27d95af53ba041
1 /* Verify that overloaded built-ins for vec_abs with int
2 inputs produce the right results when -mcpu=power7 is specified. */
4 /* { dg-do compile } */
5 /* { dg-require-effective-target powerpc_altivec_ok } */
6 /* { dg-options "-maltivec -O2 -mdejagnu-cpu=power7 -fwrapv" } */
8 #include <altivec.h>
10 vector signed int
11 test1 (vector signed int x)
13 return vec_abs (x);
16 /* { dg-final { scan-assembler-times "vspltisw|vxor" 1 } } */
17 /* { dg-final { scan-assembler-times "vsubuwm" 1 } } */
18 /* { dg-final { scan-assembler-times "vmaxsw" 1 } } */