1 /* { dg-do compile } */
2 /* { dg-options "-fdump-rtl-peephole2" } */
3 /* { dg-skip-if "code quality test" { *-*-* } { "-O0" "-O1" } { "" } } */
4 
5 typedef unsigned int __attribute__ ((mode (HI))) int_t;
6 
7 int
ctzhi(int_t * x)8 ctzhi (int_t *x)
9 {
10   return __builtin_ctz (*x);
11 }
12 
13 /* Expect assembly like:
14 
15 	ffs $0,$16,*4(%ap),%r0
16 
17  */
18 
19 /* { dg-final { scan-rtl-dump-times "Splitting with gen_peephole2" 1 "peephole2" } } */
20 /* { dg-final { scan-assembler "\tffs \\\$0,\\\$16," } } */
21