1 /* { dg-add-options vect_early_break } */
2 /* { dg-require-effective-target vect_early_break_hw } */
3 /* { dg-require-effective-target vect_int } */
10 # define BITSIZEOF_INT 32
11 # define BITSIZEOF_LONG 64
12 # define BITSIZEOF_LONG_LONG 64
14 #define MAKE_FUNS(suffix, type) \
15 int my_ffs##suffix(type x) { \
19 for (i = 0; i < CHAR_BIT * sizeof (type); i++) \
20 if (x & ((type) 1 << i)) \
25 int my_clz##suffix(type x) { \
27 for (i = 0; i < CHAR_BIT * sizeof (type); i++) \
28 if (x & ((type) 1 << ((CHAR_BIT * sizeof (type)) - i - 1))) \
34 MAKE_FUNS (, unsigned);
36 extern void abort (void);
37 extern void exit (int);
57 unsigned int ints
[] = NUMS32
;
59 #define N(table) (sizeof (table) / sizeof (table[0]))
68 for (i
= 0; i
< N(ints
); i
++)
70 if (__builtin_ffs (ints
[i
]) != my_ffs (ints
[i
]))
73 && __builtin_clz (ints
[i
]) != my_clz (ints
[i
]))
80 /* { dg-final { scan-tree-dump "LOOP VECTORIZED" "vect" { target { ! "x86_64-*-* i?86-*-*" } } } } */