aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.target/powerpc/fold-vec-select-float.c
blob: 1656fbff2ca5c30f3f1c871ba6c0e9c208b428fa (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
/* Verify that overloaded built-ins for vec_sel with float 
   inputs for VSX produce the right code.  */

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

#include <altivec.h>

vector float
test1_0 (vector float x, vector float y, vector bool int z)
{
  return vec_sel (x, y, z);
}

vector float
test1_1 (vector float x, vector float y, vector unsigned int z)
{
  return vec_sel (x, y, z);
}

/* { dg-final { scan-assembler-times {\mxxsel\M|\mvsel\M} 2 } } */