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