aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.target/powerpc/fold-vec-select-longlong.c
blob: c56bfb979d1c1792b790883f07ad1570c9004959 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
/* Verify that overloaded built-ins for vec_sel with long long
   inputs produce the right code.  */

/* { dg-do compile } */
/* { dg-options "-mvsx -O2" } */
/* { dg-require-effective-target powerpc_vsx } */

#include <altivec.h>

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

vector bool long long
test1_1 (vector bool long long x, vector bool long long y, vector unsigned long long z)
{
  return vec_sel (x, y, z);
}

vector signed long long
test3_0 (vector signed long long x, vector signed long long y, vector bool long long z)
{
  return vec_sel (x, y, z);
}

vector unsigned long long
test3_1 (vector unsigned long long x, vector unsigned long long y, vector bool long long z)
{
  return vec_sel (x, y, z);
}

/* { dg-final { scan-assembler-times "xxsel" 4 } } */