aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.target/powerpc/fold-vec-unpack-pixel.c
blob: 0f427dbc434b82ecac9519b3f895a27c85a42fb0 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
/* Verify that overloaded built-ins for vec_unpackh and vec_unpackl with pixel
   inputs produce the right code.  */

/* { dg-do compile } */
/* { dg-options "-maltivec -O2" } */
/* { dg-require-effective-target powerpc_altivec } */

#include <altivec.h>

vector unsigned int
testf_el (vector pixel vpx2)
{
  return vec_unpackl (vpx2);
}

vector unsigned int
testf_eh (vector pixel vpx2)
{
  return vec_unpackh (vpx2);
}

/* { dg-final { scan-assembler-times "vupkhpx" 1 } } */
/* { dg-final { scan-assembler-times "vupklpx" 1 } } */