Debian Codegraph @

gcc/testsuite/gcc.target/powerpc/fold-vec-logical-eqv-short.c

raw
1 /* Verify that overloaded built-ins for vec_eqv with short
2 inputs produce the right results. */
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 short
12 test1 (vector bool short x, vector bool short y)
13 {
14 return vec_eqv (x, y);
15 }
16
17 vector signed short
18 test3 (vector signed short x, vector signed short y)
19 {
20 return vec_eqv (x, y);
21 }
22
23 vector unsigned short
24 test6 (vector unsigned short x, vector unsigned short y)
25 {
26 return vec_eqv (x, y);
27 }
28
29 /* { dg-final { scan-assembler-times "xxleqv" 3 } } */