blob: 8b4e71b24c4807601398655fd2e883aa57700a34 [file] [log] [blame]
/* Verify that overloaded built-ins for vec_neg with short
inputs produce the right code. */
/* { dg-do compile } */
/* { dg-require-effective-target powerpc_p8vector_ok } */
/* { dg-options "-mvsx -O2 -mdejagnu-cpu=power8" } */
#include <altivec.h>
vector signed short
test3 (vector signed short x)
{
return vec_neg (x);
}
/* { dg-final { scan-assembler-times "xxspltib|vspltisw|vxor" 1 } } */
/* { dg-final { scan-assembler-times "vsubuhm" 1 } } */
/* { dg-final { scan-assembler-times "vmaxsh" 0 } } */