c++: normalizing ttp constraints [PR115656]
[official-gcc.git] / gcc / testsuite / gcc.target / powerpc / fold-vec-sub-longlong.c
blobc418ce1006739d06dea92eb93764c55c0540c75a
1 /* Verify that overloaded built-ins for vec_sub with long long
2 inputs produce the right results. */
4 /* { dg-do compile } */
5 /* { dg-options "-maltivec -mvsx" } */
6 /* { dg-additional-options "-mdejagnu-cpu=power8" { target { ! has_arch_pwr8 } } } */
7 /* { dg-require-effective-target powerpc_vsx } */
9 #include <altivec.h>
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 } } */