2018-03-08 Richard Biener <rguenther@suse.de>
[official-gcc.git] / gcc / testsuite / gcc.target / powerpc / fold-vec-sub-longlong.c
blob889fba4b2aa26c18670baeff94abbb58a90e8e5d
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_p8vector_ok } */
6 /* { dg-options "-maltivec -mvsx -mpower8-vector" } */
8 #include <altivec.h>
10 vector signed long long
11 test1 (vector bool long long x, vector signed long long y)
13 return vec_sub (x, y);
16 vector signed long long
17 test2 (vector signed long long x, vector bool long long y)
19 return vec_sub (x, y);
22 vector signed long long
23 test3 (vector signed long long x, vector signed long long y)
25 return vec_sub (x, y);
28 vector unsigned long long
29 test4 (vector bool long long x, vector unsigned long long y)
31 return vec_sub (x, y);
34 vector unsigned long long
35 test5 (vector unsigned long long x, vector bool long long y)
37 return vec_sub (x, y);
40 vector unsigned long long
41 test6 (vector unsigned long long x, vector unsigned long long y)
43 return vec_sub (x, y);
46 /* { dg-final { scan-assembler-times "vsubudm" 6 } } */