aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.target/powerpc/fold-vec-cntlz-longlong.c
blob: 1a72a2d38c7fcf455e09fd950504502f99ff9c76 (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_cntlz with long long
   inputs produce the right results.  */

/* { dg-do compile } */
/* { dg-require-effective-target powerpc_p8vector_ok } */
/* { dg-options "-mvsx -mpower8-vector -O2" } */

#include <altivec.h>

vector signed long long
testsl (vector signed long long vsl2)
{
  return vec_cntlz (vsl2);
}

vector unsigned long long
testul (vector unsigned long long vul2)
{
  return vec_cntlz (vul2);
}

/* { dg-final { scan-assembler-times "vclzd" 2 } } */