2018-03-08 Richard Biener <rguenther@suse.de>
[official-gcc.git] / gcc / testsuite / gcc.target / powerpc / fold-vec-abs-short.c
blob0ad850f06b312229d6d8cdcfc0f7526ea2c037bf
1 /* Verify that overloaded built-ins for vec_abs with short
2 inputs produce the right results. */
4 /* { dg-do compile } */
5 /* { dg-require-effective-target powerpc_altivec_ok } */
6 /* { dg-options "-maltivec -O2" } */
8 #include <altivec.h>
10 vector signed short
11 test3 (vector signed short x)
13 return vec_abs (x);
16 /* { dg-final { scan-assembler-times "vspltisw|xxspltib|vxor" 1 } } */
17 /* { dg-final { scan-assembler-times "vsubuhm" 1 } } */
18 /* { dg-final { scan-assembler-times "vmaxsh" 1 } } */