Debian Codegraph @

gcc/testsuite/gcc.target/powerpc/fold-vec-cmp-int.h

raw
1 /* Verify that overloaded built-ins for vec_cmp with int
2 inputs produce the right code. */
3
4 /* { dg-do compile } */
5 /* { dg-options "-mvsx -O2" } */
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 bool int
12 test3_eq (vector signed int x, vector signed int y)
13 {
14 return vec_cmpeq (x, y);
15 }
16
17 vector bool int
18 test6_eq (vector unsigned int x, vector unsigned int y)
19 {
20 return vec_cmpeq (x, y);
21 }
22
23 vector bool int
24 test3_ge (vector signed int x, vector signed int y)
25 {
26 return vec_cmpge (x, y);
27 }
28
29 vector bool int
30 test6_ge (vector unsigned int x, vector unsigned int y)
31 {
32 return vec_cmpge (x, y);
33 }
34
35 vector bool int
36 test3_gt (vector signed int x, vector signed int y)
37 {
38 return vec_cmpgt (x, y);
39 }
40
41 vector bool int
42 test6_gt (vector unsigned int x, vector unsigned int y)
43 {
44 return vec_cmpgt (x, y);
45 }
46
47 vector bool int
48 test3_le (vector signed int x, vector signed int y)
49 {
50 return vec_cmple (x, y);
51 }
52
53 vector bool int
54 test6_le (vector unsigned int x, vector unsigned int y)
55 {
56 return vec_cmple (x, y);
57 }
58
59 vector bool int
60 test3_lt (vector signed int x, vector signed int y)
61 {
62 return vec_cmplt (x, y);
63 }
64
65 vector bool int
66 test6_lt (vector unsigned int x, vector unsigned int y)
67 {
68 return vec_cmplt (x, y);
69 }
70
71 vector bool int
72 test3_ne (vector signed int x, vector signed int y)
73 {
74 return vec_cmpne (x, y);
75 }
76
77 vector bool int
78 test6_ne (vector unsigned int x, vector unsigned int y)
79 {
80 return vec_cmpne (x, y);
81 }
82