aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.target/vax/ctzhi.c
blob: fcc9f06f7d2245663a6bfa91d0c40d6263610171 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
/* { dg-do compile } */
/* { dg-options "-fdump-rtl-peephole2" } */
/* { dg-skip-if "code quality test" { *-*-* } { "-O0" "-O1" } { "" } } */

typedef unsigned int __attribute__ ((mode (HI))) int_t;

int
ctzhi (int_t *x)
{
  return __builtin_ctz (*x);
}

/* Expect assembly like:

	ffs $0,$16,*4(%ap),%r0

 */

/* { dg-final { scan-rtl-dump-times "Splitting with gen_peephole2" 1 "peephole2" } } */
/* { dg-final { scan-assembler "\tffs \\\$0,\\\$16," } } */