ubuntu-buildroot/output/build/host-gcc-initial-11.4.0/gcc/testsuite/gcc.target/powerpc/fold-vec-abs-char-fwrapv.c

19 lines
503 B
C

/* Verify that overloaded built-ins for vec_abs with char
inputs produce the right code. */
/* { dg-do compile } */
/* { dg-require-effective-target powerpc_altivec_ok } */
/* { dg-options "-maltivec -O2 -fwrapv" } */
#include <altivec.h>
vector signed char
test2 (vector signed char x)
{
return vec_abs (x);
}
/* { dg-final { scan-assembler-times "vspltisw|vxor|xxspltib" 1 } } */
/* { dg-final { scan-assembler-times "vsububm" 1 } } */
/* { dg-final { scan-assembler-times "vmaxsb" 1 } } */