Debian Codegraph @

gcc/testsuite/gcc.target/powerpc/fold-vec-sub-longlong.c

raw
1 /* Verify that overloaded built-ins for vec_sub with long long
2 inputs produce the right results. */
3
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 } */
8
9 #include <altivec.h>
10
11 vector signed long long
12 test1 (vector bool long long x, vector signed long long y)
13 {
14 return vec_sub (x, y);
15 }
16
17 vector signed long long
18 test2 (vector signed long long x, vector bool long long y)
19 {
20 return vec_sub (x, y);
21 }
22
23 vector signed long long
24 test3 (vector signed long long x, vector signed long long y)
25 {
26 return vec_sub (x, y);
27 }
28
29 vector unsigned long long
30 test4 (vector bool long long x, vector unsigned long long y)
31 {
32 return vec_sub (x, y);
33 }
34
35 vector unsigned long long
36 test5 (vector unsigned long long x, vector bool long long y)
37 {
38 return vec_sub (x, y);
39 }
40
41 vector unsigned long long
42 test6 (vector unsigned long long x, vector unsigned long long y)
43 {
44 return vec_sub (x, y);
45 }
46
47 /* { dg-final { scan-assembler-times "vsubudm" 6 } } */
48