1 /* { dg-add-options vect_early_break } */
2 /* { dg-require-effective-target vect_early_break_hw } */
3 /* { dg-require-effective-target vect_int } */
5 /* { dg-final { scan-tree-dump "LOOP VECTORIZED" "vect" { target { ! "x86_64-*-* i?86-*-*" } } } } */
10 #include "tree-vect.h"
12 #if __INT_MAX__ > 2147483647L
13 # if __INT_MAX__ >= 9223372036854775807L
14 # define BITSIZEOF_INT 64
16 # define BITSIZEOF_INT 32
19 # if __INT_MAX__ >= 2147483647L
20 # define BITSIZEOF_INT 32
22 # define BITSIZEOF_INT 16
26 #if __LONG_MAX__ > 2147483647L
27 # if __LONG_MAX__ >= 9223372036854775807L
28 # define BITSIZEOF_LONG 64
30 # define BITSIZEOF_LONG 32
33 # define BITSIZEOF_LONG 32
36 #if __LONG_LONG_MAX__ > 2147483647L
37 # if __LONG_LONG_MAX__ >= 9223372036854775807L
38 # define BITSIZEOF_LONG_LONG 64
40 # define BITSIZEOF_LONG_LONG 32
43 # define BITSIZEOF_LONG_LONG 32
46 #define MAKE_FUNS(suffix, type) \
47 int my_clrsb##suffix(type x) { \
49 int leading = (x >> CHAR_BIT * sizeof (type) - 1) & 1; \
50 for (i = 1; i < CHAR_BIT * sizeof (type); i++) \
51 if (((x >> ((CHAR_BIT * sizeof (type)) - i - 1)) & 1) \
57 MAKE_FUNS (, unsigned);
59 extern void abort (void);
60 extern void exit (int);
96 0x0000000000000000ULL, \
97 0x0000000000000001ULL, \
98 0x8000000000000000ULL, \
99 0x0000000000000002ULL, \
100 0x4000000000000000ULL, \
101 0x0000000100000000ULL, \
102 0x0000000080000000ULL, \
103 0xa5a5a5a5a5a5a5a5ULL, \
104 0x5a5a5a5a5a5a5a5aULL, \
105 0xcafecafe00000000ULL, \
106 0x0000cafecafe0000ULL, \
107 0x00000000cafecafeULL, \
108 0xffffffffffffffffULL \
111 unsigned int ints
[] =
112 #if BITSIZEOF_INT == 64
114 #elif BITSIZEOF_INT == 32
120 unsigned long longs
[] =
121 #if BITSIZEOF_LONG == 64
127 unsigned long long longlongs
[] =
128 #if BITSIZEOF_LONG_LONG == 64
134 #define N(table) (sizeof (table) / sizeof (table[0]))
143 /* Test constant folding. */
145 #define TEST(x, suffix) \
146 if (__builtin_clrsb##suffix (x) != my_clrsb##suffix (x)) \
149 #if BITSIZEOF_INT == 32