1 /* Verify that overloaded built-ins for vec_sub with long long
2 inputs produce the right results. */
4 /* { dg-do compile } */
5 /* { dg-require-effective-target powerpc_vsx_ok } */
6 /* { dg-options "-maltivec -mvsx" } */
7 /* { dg-additional-options "-mdejagnu-cpu=power8" { target { ! has_arch_pwr8 } } } */
11 vector
signed long long
12 test1 (vector
bool long long x
, vector
signed long long y
)
14 return vec_sub (x
, y
);
17 vector
signed long long
18 test2 (vector
signed long long x
, vector
bool long long y
)
20 return vec_sub (x
, y
);
23 vector
signed long long
24 test3 (vector
signed long long x
, vector
signed long long y
)
26 return vec_sub (x
, y
);
29 vector
unsigned long long
30 test4 (vector
bool long long x
, vector
unsigned long long y
)
32 return vec_sub (x
, y
);
35 vector
unsigned long long
36 test5 (vector
unsigned long long x
, vector
bool long long y
)
38 return vec_sub (x
, y
);
41 vector
unsigned long long
42 test6 (vector
unsigned long long x
, vector
unsigned long long y
)
44 return vec_sub (x
, y
);
47 /* { dg-final { scan-assembler-times "vsubudm" 6 } } */