blob: 18102ac12547b03fa0e0e08a05f191fe28cb96b7 [file] [log] [blame]
/* Verify that overloaded built-ins for vec_splat with short
inputs produce the right code. */
/* { dg-do compile } */
/* { dg-require-effective-target powerpc_altivec_ok } */
/* { dg-options "-maltivec -O2" } */
#include <altivec.h>
vector signed short
test3s (signed short x)
{
return vec_splats (x);
}
vector unsigned short
test3u (unsigned short x)
{
return vec_splats (x);
}
/* { dg-final { scan-assembler-times "vsplth" 2 } } */