Debian Codegraph @

gcc/testsuite/gcc.target/powerpc/fold-vec-unpack-pixel.c

raw
1 /* Verify that overloaded built-ins for vec_unpackh and vec_unpackl with pixel
2 inputs produce the right code. */
3
4 /* { dg-do compile } */
5 /* { dg-options "-maltivec -O2" } */
6 /* { dg-require-effective-target powerpc_altivec } */
7
8 #include <altivec.h>
9
10 vector unsigned int
11 testf_el (vector pixel vpx2)
12 {
13 return vec_unpackl (vpx2);
14 }
15
16 vector unsigned int
17 testf_eh (vector pixel vpx2)
18 {
19 return vec_unpackh (vpx2);
20 }
21
22 /* { dg-final { scan-assembler-times "vupkhpx" 1 } } */
23 /* { dg-final { scan-assembler-times "vupklpx" 1 } } */