summaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.target/powerpc/vsu/vec-cntlz-lsbb-1.c
blob: 201ed17e2fde328c5a3eb445da9178402685efb1 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
/* { dg-do compile { target { powerpc*-*-* } } } */
/* { dg-require-effective-target powerpc_p9vector_ok } */
/* { dg-options "-mdejagnu-cpu=power9" } */

#include <altivec.h>

int
count_leading_zero_byte_bits (vector unsigned char *arg1_p)
{
  vector unsigned char arg_1 = *arg1_p;

  return vec_cntlz_lsbb (arg_1);
}

/* { dg-final { scan-assembler "vclzlsbb" } } */