view gcc/testsuite/gcc.target/powerpc/fold-vec-unpack-pixel.c @ 152:2b5abeee2509

update gcc11
author anatofuz
date Mon, 25 May 2020 07:50:57 +0900
parents 84e7813d76e9
children
line wrap: on
line source

/* Verify that overloaded built-ins for vec_unpackh and vec_unpackl with pixel
   inputs produce the right code.  */

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

#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 } } */