passes: Print a header in emergency_dump_function
[official-gcc.git] / gcc / testsuite / gcc.target / powerpc / fold-vec-logical-ands-longlong.c
blob76bece11a99e5ae632146c8d0f2bcc65c49325df
1 /* Verify that overloaded built-ins for vec_and,vec_or,vec_xor with long long
2 inputs produce the right results. */
4 /* { dg-do compile } */
5 /* { dg-require-effective-target powerpc_vsx_ok } */
6 /* { dg-options "-mvsx -O2" } */
8 #include <altivec.h>
10 vector signed long long
11 test1_and (vector bool long long x, vector signed long long y)
13 vector signed long long *foo;
14 *foo += vec_and (x, y);
15 return *foo;
18 vector signed long long
19 test1_andc (vector bool long long x, vector signed long long y)
21 vector signed long long *foo;
22 *foo += vec_andc (x, y);
23 return *foo;
26 vector signed long long
27 test2_and (vector signed long long x, vector bool long long y)
29 vector signed long long *foo;
30 *foo += vec_and (x, y);
31 return *foo;
34 vector signed long long
35 test2_andc (vector signed long long x, vector bool long long y)
37 vector signed long long *foo;
38 *foo += vec_andc (x, y);
39 return *foo;
42 vector signed long long
43 test3_and (vector signed long long x, vector signed long long y)
45 vector signed long long *foo;
46 *foo += vec_and (x, y);
47 return *foo;
50 vector signed long long
51 test3_andc (vector signed long long x, vector signed long long y)
53 vector signed long long *foo;
54 *foo += vec_andc (x, y);
55 return *foo;
58 vector unsigned long long
59 test4_and (vector bool long long x, vector unsigned long long y)
61 vector unsigned long long *foo;
62 *foo += vec_and (x, y);
63 return *foo;
66 vector unsigned long long
67 test4_andc (vector bool long long x, vector unsigned long long y)
69 vector unsigned long long *foo;
70 *foo += vec_andc (x, y);
71 return *foo;
74 vector unsigned long long
75 test5_and (vector unsigned long long x, vector bool long long y)
77 vector unsigned long long *foo;
78 *foo += vec_and (x, y);
79 return *foo;
82 vector unsigned long long
83 test5_andc (vector unsigned long long x, vector bool long long y)
85 vector unsigned long long *foo;
86 *foo += vec_andc (x, y);
87 return *foo;
90 vector unsigned long long
91 test6_and (vector unsigned long long x, vector unsigned long long y)
93 vector unsigned long long *foo;
94 *foo += vec_and (x, y);
95 return *foo;
98 vector unsigned long long
99 test6_andc (vector unsigned long long x, vector unsigned long long y)
101 vector unsigned long long *foo;
102 *foo += vec_andc (x, y);
103 return *foo;
106 /* { dg-final { scan-assembler-times {\mxxland\M} 6 } } */
107 /* { dg-final { scan-assembler-times {\mxxlandc\M} 6 } } */