ubuntu-buildroot/output/build/host-gcc-initial-11.4.0/gcc/testsuite/gcc.target/powerpc/fold-vec-select-int.c

47 lines
1.0 KiB
C
Raw Permalink Normal View History

2024-04-01 15:19:46 +00:00
/* Verify that overloaded built-ins for vec_sel with int
inputs produce the right code. */
/* { dg-do compile } */
/* { dg-require-effective-target powerpc_vsx_ok } */
/* { dg-options "-maltivec -O2" } */
#include <altivec.h>
vector bool int
test1_0 (vector bool int x, vector bool int y, vector bool int z)
{
return vec_sel (x, y, z);
}
vector bool int
test1_1 (vector bool int x, vector bool int y, vector unsigned int z)
{
return vec_sel (x, y, z);
}
vector signed int
test3_0 (vector signed int x, vector signed int y, vector bool int z)
{
return vec_sel (x, y, z);
}
vector signed int
test3_1 (vector signed int x, vector signed int y, vector unsigned int z)
{
return vec_sel (x, y, z);
}
vector unsigned int
test6_0 (vector unsigned int x, vector unsigned int y, vector bool int z)
{
return vec_sel (x, y, z);
}
vector unsigned int
test6_1 (vector unsigned int x, vector unsigned int y, vector unsigned int z)
{
return vec_sel (x, y, z);
}
/* { dg-final { scan-assembler-times {\mxxsel\M|\mvsel\M} 6 } } */